Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add app unit tests to app internal integration test #1046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
jonsimantov wants to merge 8 commits into main
base: main
Choose a base branch
Loading
from testing/add-unit-tests-to-app-integration-test

Conversation

Copy link
Contributor

@jonsimantov jonsimantov commented Aug 8, 2022

Description

Provide details of the change, and generalize the change in the PR title above.


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@jonsimantov jonsimantov changed the title (削除) Add unit tests to app integration test (削除ここまで) (追記) Add app unit tests to app internal integration test (追記ここまで) Aug 8, 2022
for (int i = 0; i < args_vector.size(); ++i) {
const char* arg = args_vector[i].c_str();
char* arg_copy = new char[std::strlen(arg) + 1];
std::strcpy(arg_copy, arg);
Copy link

@github-actions github-actions bot Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Lint warning: Almost always, snprintf is better than strcpy


// Blocking HTTP request helper function, for testing only.
static bool SendHttpPostRequest(
const char* url, const std::map<std::string, std::string>& headers,
Copy link

@github-actions github-actions bot Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Lint warning: Add #include <map> for map<>

static bool Base64Encode(const std::string& input, std::string* output);
// Decode a base64 string to binary. Returns true if the decoding succeeded,
// false if it failed.
static bool Base64Decode(const std::string& input, std::string* output);
Copy link

@github-actions github-actions bot Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Lint warning: Add #include <string> for string

@@ -82,12 +81,14 @@ using testing::Not;

namespace firebase {

extern std::string g_test_srcdir;
std::string g_test_srcdir;
Copy link

@github-actions github-actions bot Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Lint warning: Static/global string variables are not permitted.

EXPECT_EQ(encoded_firebase, encoded_openssh)
<< "Encoding mismatch on source buffer: " << orig;

std::string decoded_firebase_to_openssh;
std::string decoded_openssh_to_firebase;
ASSERT_TRUE(Base64Decode(encoded_openssh, &decoded_openssh_to_firebase));
ASSERT_TRUE(OpenSSHDecode(encoded_firebase, &decoded_firebase_to_openssh));
ASSERT_TRUE(OpenSSHDecode(&encoded_firebase[0], encoded_firebase.length(),
&decoded_firebase_to_openssh));
Copy link

@github-actions github-actions bot Jan 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Lint warning: Tab found; better to use spaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@github-actions github-actions[bot] github-actions[bot] left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /