diff --git a/.github/config/nodejs-dev.jsonc b/.github/config/nodejs-dev.jsonc index 088934266a..4006da2531 100644 --- a/.github/config/nodejs-dev.jsonc +++ b/.github/config/nodejs-dev.jsonc @@ -184,6 +184,7 @@ "healthcare/datasets", "healthcare/dicom", "healthcare/hl7v2", + "iam/deny", "kms", "media/livestream", "media/transcoder", diff --git a/.github/config/nodejs-prod.jsonc b/.github/config/nodejs-prod.jsonc index bee3b1d2ed..922579ed1a 100644 --- a/.github/config/nodejs-prod.jsonc +++ b/.github/config/nodejs-prod.jsonc @@ -94,7 +94,6 @@ "functions/slack", // TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type ... Received undefined "functions/v2/imagemagick", // (untested) Error: A bucket name is needed to use Cloud Storage. "healthcare/fhir", // Error: Cannot find module 'whatwg-url' - "iam/deny", // PERMISSION_DENIED: Permission iam.googleapis.com/denypolicies.create denied on resource cloudresourcemanager.googleapis.com/projects/long-door-651 "recaptcha_enterprise/snippets", // Cannot use import statement outside a module "run/idp-sql", // (untested) Error: Invalid contents in the credentials file "scheduler", // SyntaxError: Cannot use import statement outside a module diff --git a/iam/deny/test/deny.test.js b/iam/deny/test/deny.test.js index d4eee1438c..a96b103ba4 100644 --- a/iam/deny/test/deny.test.js +++ b/iam/deny/test/deny.test.js @@ -17,21 +17,17 @@ const {assert} = require('chai'); const uuid = require('uuid'); const cp = require('child_process'); -const {describe, it, before} = require('mocha'); +const {describe, it} = require('mocha'); const {PoliciesClient} = require('@google-cloud/iam').v2; const iamClient = new PoliciesClient(); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); describe('IAM deny samples', () => { - let projectId; + const projectId = process.env.PROJECT_ID; const policyId = `gcloud-test-policy-${uuid.v4().split('-')[0]}`; const policyName = `policies/cloudresourcemanager.googleapis.com%2Fprojects%2F949737848314/denypolicies/${policyId}`; - before(async () => { - projectId = await iamClient.getProjectId(); - }); - it('should create IAM policy', async () => { const output = execSync(`node createDenyPolicy ${projectId} ${policyId}`);