Skip to content

Conversation

@dinagraves
Copy link
Contributor

@dinagraves dinagraves commented Jun 5, 2020

Tests for hello-broken and logging-manual.

Original plan was to do all the e2e-tests in one PR, but the logging-manual one got a little more complicated.

Using the Stackdriver API to check that the message logged properly, as this is the main feature of the sample & tutorial. I can be convinced to use the python client instead of the HTTP call.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 5, 2020
@dinagraves dinagraves marked this pull request as ready for review June 5, 2020 17:43
@dinagraves dinagraves requested review from a team and averikitsch as code owners June 5, 2020 17:43
@dinagraves dinagraves requested a review from grayside June 5, 2020 17:46
@dinagraves dinagraves changed the title E2E tests E2E tests for Cloud Run hello-broken and logging-manual samples Jun 5, 2020
assert entries


def stackdriver_request(service_name, project, access_token):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to add retries.

Updated to the client library. The reason why I didn't use it as first is because doing the direct HTTP calls is generally easier. The documentation for the client libraries is often not great. By contrast, I can use the API explorer to figure out the correct API call and then copy the HTTP request from the UI.

# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
# build specific Cloud project. You can also use your own string
# to use your own Cloud project.
'gcloud_project_env': 'GCLOUD_PROJECT',
Copy link
Collaborator

Choose a reason for hiding this comment

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

GCLOUD_PROJECT is deprecated in GAE at least, in favor of GOOGLE_CLOUD_PROJECT which I see used elsewhere in this PR. Should this be standardized?

Copy link
Contributor

Choose a reason for hiding this comment

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

@GoogleCloudPlatform/python-samples-owners We should probably switch to GOOGLE_CLOUD_PROJECT in this repo. Opened #4019

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@leahecole leahecole merged commit bc5a533 into master Jun 9, 2020
@leahecole leahecole deleted the e2e-tests branch June 9, 2020 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants