Skip to content

Commit

Permalink
fix(parametermanager): Updated projectid to get from glcoud cli
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsal-vora-crestdata committed Feb 26, 2025
1 parent ece26d6 commit d565135
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parameter-manager/test/parametermanager.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const client = new ParameterManagerClient();
const {SecretManagerServiceClient} = require('@google-cloud/secret-manager');
const secretClient = new SecretManagerServiceClient();

const projectId = process.env.GCLOUD_PROJECT;
let projectId;
const locationId = process.env.GCLOUD_LOCATION || 'us-central1';
const options = {};
options.apiEndpoint = `parametermanager.${locationId}.rep.googleapis.com`;
Expand Down Expand Up @@ -57,6 +57,8 @@ describe('Parameter Manager samples', () => {
const regionalParametersToDelete = [];

before(async () => {
projectId = await client.getProjectId();

// Create a secret
[secret] = await secretClient.createSecret({
parent: `projects/${projectId}`,
Expand Down

0 comments on commit d565135

Please sign in to comment.