Skip to content

fix(ppr-api, mhr-api): run unit tests without a GCP service account key - #2385

Open
panish16 wants to merge 1 commit into
bcgov:mainfrom
panish16:ci-keyless-unit-tests
Open

panish16 wants to merge 1 commit into
bcgov:mainfrom
panish16:ci-keyless-unit-tests

Conversation

@panish16

Copy link
Copy Markdown
Collaborator

CI unit tests downloaded a live ppr-dev-sa key from an unauthenticated mock endpoint (mockTarget/.../mock-sa-ppr). Remove that download and, when no GOOGLE_DEFAULT_SA is set, give the test session placeholder application default credentials so the Pub/Sub publisher can be created. Tests that need real GCP access already skip without a key; with a key set locally they run as before.

Issue #: /bcgov/entity###

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).

CI unit tests downloaded a live ppr-dev-sa key from an unauthenticated
mock endpoint (mockTarget/.../mock-sa-ppr). Remove that download and, when
no GOOGLE_DEFAULT_SA is set, give the test session placeholder application
default credentials so the Pub/Sub publisher can be created. Tests that
need real GCP access already skip without a key; with a key set locally
they run as before.
@bcregistry-sre

Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://bcregistry-assets-dev--pr-2385-4mr8zhll.web.app

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants