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

test: add integration tests for external account clients #1117

Merged
merged 40 commits into from
Jan 21, 2021
Merged

test: add integration tests for external account clients #1117

merged 40 commits into from
Jan 21, 2021

Conversation

bojeil-google
Copy link
Contributor

Adds integration tests for external account clients.
A setup script /samples/scripts/externalclient-setup.js is added to make the workload identity pool configuration changes on the current project so the samples/test/externalclient.test.js tests can be run. This can be run via npm run samples-setup after setting the GOOGLE_APPLICATION_CREDENTIALS environment variable.
The setup script only needs to be run once on a project. The samples tests will simulate a local OIDC resource and test file-sourced and url-sourced credentials. This will be run as part of the existing samples-test suite.

Detailed instructions on how to configure the service account and GCP project are provided in samples/script/externalclient-setup.js.
Detailed instructions on the external client tests are provided in samples/test/externalclient.test.js.

grayside and others added 30 commits August 7, 2020 16:32
* chore: updated samples/package.json [ci skip]

* chore: updated CHANGELOG.md [ci skip]

* chore: updated package.json

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/5f7f9c6d-c75a-4c60-8bb8-0026a14cead7/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@94421c4
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@bd0deaa
This PR was generated using Autosynth. 🌈



- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@5747555
* chore: updated samples/package.json [ci skip]

* chore: updated CHANGELOG.md [ci skip]

* chore: updated package.json

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Minor change that fixes a spelling error. I don't think an issue needed to be opened for this. Thanks!
Add await

Co-authored-by: Justin Beckwith <[email protected]>
Co-authored-by: sofisl <[email protected]>
Co-authored-by: Benjamin E. Coe <[email protected]>
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/7a1b0b96-8ddb-4836-a1a2-d2f73b7e6ffe/targets

- [ ] To automatically regenerate this PR, check this box.
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/ba2d388f-b3b2-4ad7-a163-0c6b4d86894f/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@05de3e1
…1048)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/96acae41-dfd7-4d71-95d3-12436053b826/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@8cf6d28
…ncy versions (#1055)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/57acd272-496f-4414-af01-fc62837d5aa1/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@fdd03c1
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>

Source-Author: F. Hinkelmann <[email protected]>
Source-Date: Wed Sep 30 14:13:57 2020 -0400
Source-Repo: googleapis/synthtool
Source-Sha: 079dcce498117f9570cebe6e6cff254b38ba3860
Source-Link: googleapis/synthtool@079dcce
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/92424049-be37-4899-bb0c-b2b51f64b7af/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@0c868d4
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | major | [`^3.1.1` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.0.0) |

---

### Release Notes

<details>
<summary>webpack/webpack-cli</summary>

### [`v4.0.0`](https://togithub.com/webpack/webpack-cli/blob/master/CHANGELOG.md#&#8203;400-httpsgithubcomwebpackwebpack-clicomparewebpack-cli400-rc1webpack-cli400-2020-10-10)

[Compare Source](https://togithub.com/webpack/webpack-cli/compare/[email protected])

##### Bug Fixes

-   add compilation lifecycle in watch instance ([#&#8203;1903](https://togithub.com/webpack/webpack-cli/issues/1903)) ([02b6d21](https://togithub.com/webpack/webpack-cli/commit/02b6d21eaa20166a7ed37816de716b8fc22b756a))
-   cleanup `package-utils` package ([#&#8203;1822](https://togithub.com/webpack/webpack-cli/issues/1822)) ([fd5b92b](https://togithub.com/webpack/webpack-cli/commit/fd5b92b3cd40361daec5bf4486e455a41f4c9738))
-   cli-executer supplies args further up ([#&#8203;1904](https://togithub.com/webpack/webpack-cli/issues/1904)) ([097564a](https://togithub.com/webpack/webpack-cli/commit/097564a851b36b63e0a6bf88144997ef65aa057a))
-   exit code for validation errors ([59f6303](https://togithub.com/webpack/webpack-cli/commit/59f63037fcbdbb8934b578b9adf5725bc4ae1235))
-   exit process in case of schema errors ([71e89b4](https://togithub.com/webpack/webpack-cli/commit/71e89b4092d953ea587cc4f606451ab78cbcdb93))

##### Features

-   assign config paths in build dependencies in cache config ([#&#8203;1900](https://togithub.com/webpack/webpack-cli/issues/1900)) ([7e90f11](https://togithub.com/webpack/webpack-cli/commit/7e90f110b119f36ef9def4f66cf4e17ccf1438cd))

</details>

---

### Renovate configuration

:date: **Schedule**: "after 9am and before 3pm" (UTC).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-auth-library-nodejs).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gaxios](https://togithub.com/googleapis/gaxios) | dependencies | major | [`^3.0.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/gaxios/3.2.0/4.0.0) |

---

### Release Notes

<details>
<summary>googleapis/gaxios</summary>

### [`v4.0.0`](https://togithub.com/googleapis/gaxios/blob/master/CHANGELOG.md#&#8203;400-httpswwwgithubcomgoogleapisgaxioscomparev320v400-2020-10-21)

[Compare Source](https://togithub.com/googleapis/gaxios/compare/v3.2.0...v4.0.0)

##### ⚠ BREAKING CHANGES

-   parameters in `url` and parameters provided via params will now be combined.

##### Bug Fixes

-   drop requirement on URL/combine url and params ([#&#8203;338](https://www.github.com/googleapis/gaxios/issues/338)) ([e166bc6](https://www.github.com/googleapis/gaxios/commit/e166bc6721fd979070ab3d9c69b71ffe9ee061c7))

</details>

---

### Renovate configuration

:date: **Schedule**: "after 9am and before 3pm" (UTC).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-auth-library-nodejs).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/d837e2c5-e7f6-4c9f-a98e-12a1b08a381f/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@89c849b
Source-Link: googleapis/synthtool@a783321
Source-Link: googleapis/synthtool@b7413d3
Source-Link: googleapis/synthtool@5f6ef0e
Source-Author: Benjamin E. Coe <[email protected]>
Source-Date: Mon Nov 2 15:56:09 2020 -0500
Source-Repo: googleapis/synthtool
Source-Sha: ba9918cd22874245b55734f57470c719b577e591
Source-Link: googleapis/synthtool@ba9918c
JustinBeckwith and others added 10 commits November 3, 2020 09:36
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/b1c0ae50-0eb0-40ae-94e1-24ab7c3527c2/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@15013ef
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/f858a143-daac-4e50-b9ae-219abe9981ce/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@363fe30
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Adds integration tests for external account clients.
A setup script `/samples/scripts/externalclient-setup.js` is added to make the workload identity pool configuration changes on the current project so the `samples/test/externalclient.test.js` tests can be run. This can be run via `npm run samples-setup` after setting the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
The setup script only needs to be run once on a project. The samples tests will simulate a local OIDC resource and test file-sourced and url-sourced credentials. This will be run as part of the existing `samples-test` suite.

Detailed instructions on how to configure the service account and GCP project are provided in `samples/script/externalclient-setup.js`.
Detailed instructions on the external client tests are provided in `samples/test/externalclient.test.js`.
@bojeil-google bojeil-google requested a review from a team as a code owner January 19, 2021 03:34
@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

❗ No coverage uploaded for pull request base (byoid@31b9cfb). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             byoid    #1117   +/-   ##
========================================
  Coverage         ?   93.77%           
========================================
  Files            ?       28           
  Lines            ?     6249           
  Branches         ?      651           
========================================
  Hits             ?     5860           
  Misses           ?      389           
  Partials         ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31b9cfb...3fe3a6a. Read the comment docs.

@google-cla
Copy link

google-cla bot commented Jan 19, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no This human has *not* signed the Contributor License Agreement. label Jan 19, 2021
@bcoe bcoe added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jan 21, 2021
@bcoe bcoe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 21, 2021
@bcoe bcoe merged commit ba91949 into googleapis:byoid Jan 21, 2021
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. kokoro:force-run Add this label to force Kokoro to re-run the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.