SecurityCenter: update Code Snippets.#7628
Conversation
|
@engelke Would you be able to review this? |
| ) | ||
|
|
||
|
|
||
| def test_list_source(organization_id): |
There was a problem hiding this comment.
What if nobody has set up this organization before running tests?
There was a problem hiding this comment.
Then the tests fail. I have a sample org that I need to enable access to python test service accounts for this repo. Could you provide me with these and i'll can enable them?
There was a problem hiding this comment.
@engelke snippets/noxfile.py skips running the snippets if the GCLOUD_ORGANIZATION environment variable is not test.
@emkornfield The default CI account for the google-cloud-python repository is precise-truck-742. Once that project has access to that organization, please have @busunkim96 or @crwilcox change the Kokoro setup to add that environment variable.
There was a problem hiding this comment.
@tseaver I need to full service account associated with the project to grant access, i.e. something like foo@precise-truck-742.iam.gserviceaccount.com
There was a problem hiding this comment.
@busunkim96 can you provide the right service account to @emkornfield here?
There was a problem hiding this comment.
@emkornfield I sent you an email with the full account name
There was a problem hiding this comment.
@crwilcox @busunkim96 I granted access to the account can you set the environment variable?
There was a problem hiding this comment.
ORG (1081635000895)
There was a problem hiding this comment.
I should set GCLOUD_ORGANIZATION to 1081635000895?
engelke
left a comment
There was a problem hiding this comment.
Are these intended to be example code snippets (in which case I suggest they belong in python-docs-samples, not here) or tests of the libraries? Many of the _test procedures aren't tests at all, just examples.
Please clarify, or move to python-docs-samples and restructure the code as snippets (examples) and tests (to test the examples) instead of having a single kind of file.
That isn't consistent across the API libraries: we host snippets here for a number of them ( |
This should complete the snippets needed for the initial version of the documentation. I'm going through now and adding them to staging, so there might be one or two that need to be refined.