Skip to content
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

Write a real test for encryption sample code #281

Closed
tmatsuo opened this issue Apr 26, 2016 · 0 comments
Closed

Write a real test for encryption sample code #281

tmatsuo opened this issue Apr 26, 2016 · 0 comments
Labels
🚨 This issue needs some love. testing triage me I really want to be triaged.

Comments

@tmatsuo
Copy link
Contributor

tmatsuo commented Apr 26, 2016

The current test just invokes the function, but it's very nice if the test actually check if one of the operations described in the doc.

For example, you can invoke:

$ gcloud beta compute disks create example-disk --csek-key-file example-file

with the file created by the current code in the example. When I run the command above with an arbitrary file, it threw the following error:

InvalidKeyFileException: No JSON object could be decoded

IMHO, ensuring it successfully creates a disk by such a test will be a big win.

theacodes pushed a commit that referenced this issue May 10, 2016
Change-Id: I4380eabd4602cc06cd6946ac0ca20d1d543c3935
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
nicain pushed a commit that referenced this issue Nov 2, 2022
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
msampathkumar pushed a commit that referenced this issue Nov 9, 2022
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
msampathkumar pushed a commit that referenced this issue Nov 9, 2022
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
dandhlee pushed a commit that referenced this issue Nov 15, 2022
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
msampathkumar pushed a commit that referenced this issue Nov 17, 2022
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
telpirion pushed a commit that referenced this issue Dec 2, 2022
* chore(python): add missing import for prerelease testing

Source-Link: googleapis/synthtool@d2871d9
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b2dc5f80edcf5d4486c39068c9fa11f7f851d9568eea4dcba130f994ea9b5e97

* check samples failure

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* lint

* check samples failure

* add 30 seconds to request timestamp

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
dandhlee pushed a commit that referenced this issue Dec 2, 2022
* chore(python): add missing import for prerelease testing

Source-Link: googleapis/synthtool@d2871d9
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b2dc5f80edcf5d4486c39068c9fa11f7f851d9568eea4dcba130f994ea9b5e97

* check samples failure

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* lint

* check samples failure

* add 30 seconds to request timestamp

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
holtskinner pushed a commit that referenced this issue Jan 3, 2023
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
holtskinner pushed a commit that referenced this issue Jan 4, 2023
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
dandhlee pushed a commit that referenced this issue Jan 5, 2023
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
rsamborski pushed a commit that referenced this issue Jan 20, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
gcf-merge-on-green bot pushed a commit that referenced this issue Jan 25, 2023
- feat(samples): private CA python samples
- chore(deps): update dependency google-cloud-private-ca to v1 (#89)
- chore(deps): update dependency google-cloud-kms to v2.4.1 (#88)
- chore(deps): update dependency google-cloud-kms to v2.4.2 (#93)
- chore(deps): update dependency google-auth to v1.33.1 (#87)
- chore(deps): update dependency google-auth to v1.34.0 (#94)
- chore(deps): update dependency google-cloud-kms to v2.4.3 (#96)
- chore(deps): update dependency google-cloud-private-ca to v1.0.3 (#97)
- feat(samples): add local generation for crypto keys (#98)
- chore(deps): update dependency google-cloud-kms to v2.5.0 (#101)
- chore: generate python samples templates in owlbot.py (#108)
- chore(deps): update dependency cryptography to v3.4.8 (#109)
- chore(deps): update dependency google-auth to v2 (#107)
- chore(deps): update dependency google-cloud-private-ca to v1.0.4 (#103)
- chore(deps): update dependency google-auth to v2.0.2 (#116)
- chore(deps): update dependency google-cloud-kms to v2.6.0 (#115)
- chore(deps): update dependency pytest to v6.2.5 (#114)
- chore: blacken samples noxfile template (#121)
- chore: fail samples nox session if python version is missing (#128)
- chore(python): Add kokoro configs for python 3.10 samples testing (#134)
- chore(deps): update dependency google-auth to v2.1.0 (#120)
- chore(deps): update all dependencies (#144)
- chore(deps): update all dependencies (#146)
- chore(deps): update dependency google-cloud-private-ca to v1.2.1 (#147)
- chore(python): run blacken session for all directories with a noxfile (#150)
- chore(deps): update dependency cryptography to v36 (#154)
- feat(samples): add subordinate CA samples
- chore(deps): update dependency cryptography to v36.0.1 (#158)
- chore(samples): Add check for tests in directory (#164)
- chore(python): Noxfile recognizes that tests can live in a folder (#169)
- docs(samples): add sample to filter certificates (#160)
- chore(deps): update dependency google-auth to v2.6.0 (#173)
- docs(samples): add template/monitoring samples (#174)
- chore(deps): update all dependencies (#178)
- chore(deps): update all dependencies (#186)
- chore: Adding support for pytest-xdist and pytest-parallel (#193)
- chore(deps): update all dependencies (#196)
- chore(deps): update dependency google-cloud-private-ca to v1.3.0 (#199)
- chore(deps): update dependency pytest to v7.1.0 (#200)
- chore(deps): update dependency cryptography to v36.0.2 (#201)
- chore(deps): update all dependencies (#202)
- chore(python): use black==22.3.0 (#204)
- chore(deps): update dependency google-auth to v2.6.3 (#211)
- chore(deps): update dependency google-auth to v2.6.4 (#215)
- chore(deps): update dependency google-auth to v2.6.5 (#217)
- chore(python): add nox session to sort python imports (#218)
- chore(deps): update dependency google-auth to v2.6.6 (#221)
- chore(deps): update dependency pytest to v7.1.2 (#222)
- chore(deps): update dependency cryptography to v37 (#223)
- chore(deps): update dependency cryptography to v37.0.1 (#225)
- chore(deps): update dependency cryptography to v37.0.2 (#226)
- chore(deps): update dependency google-cloud-private-ca to v1.3.1 (#230)
- fix: require python 3.7+ (#267)
- chore(deps): update all dependencies (#262)
- chore(deps): update all dependencies (#273)
- chore(deps): update all dependencies (#275)
- chore(deps): update all dependencies (#276)
- chore(deps): update dependency google-cloud-monitoring to v2.11.1 (#281)
- chore(deps): update all dependencies (#283)
- chore(deps): update dependency google-auth to v2.11.0 (#284)
- chore(deps): update dependency pytest to v7.1.3 (#294)
- chore: Bump gapic-generator-python version to 1.3.0 (#295)
- chore: detect samples tests in nested directories (#299)
- chore(deps): update dependency google-auth to v2.11.1 (#300)
- chore(deps): update dependency google-auth to v2.12.0 (#302)
- chore(deps): update all dependencies (#304)
- chore(deps): update all dependencies (#307)
- chore(deps): update dependency pytest to v7.2.0 (#308)
- chore(deps): update dependency google-auth to v2.14.0 (#310)
- chore(python): drop flake8-import-order in samples noxfile (#315)
- chore(deps): update all dependencies (#311)
- chore(deps): update dependency cryptography to v38.0.4 (#317)
- chore(deps): update dependency google-auth to v2.15.0 (#318)
- chore(deps): update all dependencies (#321)
- chore(deps): update dependency google-cloud-private-ca to v1.5.0 (#322)
- chore(deps): update dependency cryptography to v39 (#323)
- chore(python): add support for python 3.11 (#324)
- chore(deps): update dependency google-cloud-monitoring to v2.13.0 (#325)
- chore(deps): update dependency google-auth to v2.16.0 (#326)
- chore(deps): update all dependencies (#329)
- chore(deps): update dependency pytest to v7.2.1 (#330)

## Description

Sample Migration from googleapis/python-security-private-ca

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

## Checklist
- [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md)
- [ ] README is updated to include [all relevant information](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#readme-file)
- [ ] **Tests** pass:   `nox -s py-3.9` (see [Test Environment Setup](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [ ] **Lint** pass:   `nox -s lint` (see [Test Environment Setup](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones)
- [ ] Please **merge** this PR for me once it is approved.
- [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/.github/CODEOWNERS) with the codeowners for this sample
m-strzelczyk pushed a commit that referenced this issue Jan 25, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
telpirion pushed a commit that referenced this issue Mar 13, 2023
- feat(samples): private CA python samples
- chore(deps): update dependency google-cloud-private-ca to v1 (#89)
- chore(deps): update dependency google-cloud-kms to v2.4.1 (#88)
- chore(deps): update dependency google-cloud-kms to v2.4.2 (#93)
- chore(deps): update dependency google-auth to v1.33.1 (#87)
- chore(deps): update dependency google-auth to v1.34.0 (#94)
- chore(deps): update dependency google-cloud-kms to v2.4.3 (#96)
- chore(deps): update dependency google-cloud-private-ca to v1.0.3 (#97)
- feat(samples): add local generation for crypto keys (#98)
- chore(deps): update dependency google-cloud-kms to v2.5.0 (#101)
- chore: generate python samples templates in owlbot.py (#108)
- chore(deps): update dependency cryptography to v3.4.8 (#109)
- chore(deps): update dependency google-auth to v2 (#107)
- chore(deps): update dependency google-cloud-private-ca to v1.0.4 (#103)
- chore(deps): update dependency google-auth to v2.0.2 (#116)
- chore(deps): update dependency google-cloud-kms to v2.6.0 (#115)
- chore(deps): update dependency pytest to v6.2.5 (#114)
- chore: blacken samples noxfile template (#121)
- chore: fail samples nox session if python version is missing (#128)
- chore(python): Add kokoro configs for python 3.10 samples testing (#134)
- chore(deps): update dependency google-auth to v2.1.0 (#120)
- chore(deps): update all dependencies (#144)
- chore(deps): update all dependencies (#146)
- chore(deps): update dependency google-cloud-private-ca to v1.2.1 (#147)
- chore(python): run blacken session for all directories with a noxfile (#150)
- chore(deps): update dependency cryptography to v36 (#154)
- feat(samples): add subordinate CA samples
- chore(deps): update dependency cryptography to v36.0.1 (#158)
- chore(samples): Add check for tests in directory (#164)
- chore(python): Noxfile recognizes that tests can live in a folder (#169)
- docs(samples): add sample to filter certificates (#160)
- chore(deps): update dependency google-auth to v2.6.0 (#173)
- docs(samples): add template/monitoring samples (#174)
- chore(deps): update all dependencies (#178)
- chore(deps): update all dependencies (#186)
- chore: Adding support for pytest-xdist and pytest-parallel (#193)
- chore(deps): update all dependencies (#196)
- chore(deps): update dependency google-cloud-private-ca to v1.3.0 (#199)
- chore(deps): update dependency pytest to v7.1.0 (#200)
- chore(deps): update dependency cryptography to v36.0.2 (#201)
- chore(deps): update all dependencies (#202)
- chore(python): use black==22.3.0 (#204)
- chore(deps): update dependency google-auth to v2.6.3 (#211)
- chore(deps): update dependency google-auth to v2.6.4 (#215)
- chore(deps): update dependency google-auth to v2.6.5 (#217)
- chore(python): add nox session to sort python imports (#218)
- chore(deps): update dependency google-auth to v2.6.6 (#221)
- chore(deps): update dependency pytest to v7.1.2 (#222)
- chore(deps): update dependency cryptography to v37 (#223)
- chore(deps): update dependency cryptography to v37.0.1 (#225)
- chore(deps): update dependency cryptography to v37.0.2 (#226)
- chore(deps): update dependency google-cloud-private-ca to v1.3.1 (#230)
- fix: require python 3.7+ (#267)
- chore(deps): update all dependencies (#262)
- chore(deps): update all dependencies (#273)
- chore(deps): update all dependencies (#275)
- chore(deps): update all dependencies (#276)
- chore(deps): update dependency google-cloud-monitoring to v2.11.1 (#281)
- chore(deps): update all dependencies (#283)
- chore(deps): update dependency google-auth to v2.11.0 (#284)
- chore(deps): update dependency pytest to v7.1.3 (#294)
- chore: Bump gapic-generator-python version to 1.3.0 (#295)
- chore: detect samples tests in nested directories (#299)
- chore(deps): update dependency google-auth to v2.11.1 (#300)
- chore(deps): update dependency google-auth to v2.12.0 (#302)
- chore(deps): update all dependencies (#304)
- chore(deps): update all dependencies (#307)
- chore(deps): update dependency pytest to v7.2.0 (#308)
- chore(deps): update dependency google-auth to v2.14.0 (#310)
- chore(python): drop flake8-import-order in samples noxfile (#315)
- chore(deps): update all dependencies (#311)
- chore(deps): update dependency cryptography to v38.0.4 (#317)
- chore(deps): update dependency google-auth to v2.15.0 (#318)
- chore(deps): update all dependencies (#321)
- chore(deps): update dependency google-cloud-private-ca to v1.5.0 (#322)
- chore(deps): update dependency cryptography to v39 (#323)
- chore(python): add support for python 3.11 (#324)
- chore(deps): update dependency google-cloud-monitoring to v2.13.0 (#325)
- chore(deps): update dependency google-auth to v2.16.0 (#326)
- chore(deps): update all dependencies (#329)
- chore(deps): update dependency pytest to v7.2.1 (#330)

## Description

Sample Migration from googleapis/python-security-private-ca

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

## Checklist
- [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md)
- [ ] README is updated to include [all relevant information](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#readme-file)
- [ ] **Tests** pass:   `nox -s py-3.9` (see [Test Environment Setup](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [ ] **Lint** pass:   `nox -s lint` (see [Test Environment Setup](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones)
- [ ] Please **merge** this PR for me once it is approved.
- [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/.github/CODEOWNERS) with the codeowners for this sample
telpirion pushed a commit that referenced this issue Mar 13, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea added a commit that referenced this issue Jun 8, 2023
)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea added a commit that referenced this issue Jun 8, 2023
)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. testing triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants