Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions handwritten/spanner/cloudbuild-regular-sessions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ steps:
dir: 'handwritten/spanner'
env:
- 'GCLOUD_PROJECT=${_GCP_PROJECT_ID}' # Pass project ID via build variable
- 'TRIGGER_NAME=${TRIGGER_NAME}'
# If you need specific credentials from Secret Manager, uncomment these:
# - 'GOOGLE_APPLICATION_CREDENTIALS=/secrets/sa-key.json'
- 'GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS=false'
Expand Down
8 changes: 4 additions & 4 deletions handwritten/spanner/system-test/spanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import {isNull, isNumber, isUuid} from '../src/helper';
const fs = require('fs');

const SKIP_BACKUPS = process.env.SKIP_BACKUPS;
const KOKORO_JOB_NAME = process.env.KOKORO_JOB_NAME;
const TRIGGER_NAME = process.env.TRIGGER_NAME;
const SKIP_FGAC_TESTS = (process.env.SKIP_FGAC_TESTS || 'false').toLowerCase();

const IAM_MEMBER = process.env.IAM_MEMBER;
Expand Down Expand Up @@ -558,7 +558,7 @@ describe('Spanner', () => {
await table.insert({BoolValue: 'abc'});
assert.fail('Expected an error to be thrown, but it was not.');
} catch (err: any) {
KOKORO_JOB_NAME?.includes('system-test-regular-session')
TRIGGER_NAME?.includes('regular-sessions')
? assert.strictEqual(err.code, grpc.status.FAILED_PRECONDITION)
: assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT);
}
Expand Down Expand Up @@ -1199,7 +1199,7 @@ describe('Spanner', () => {
await insert({NumericValue: value}, dialect);
assert.fail('Expected an error to be thrown, but it was not.');
} catch (err: any) {
KOKORO_JOB_NAME?.includes('system-test-regular-session')
TRIGGER_NAME?.includes('regular-sessions')
? assert.ok(
err.code === grpc.status.FAILED_PRECONDITION ||
err.code === grpc.status.OUT_OF_RANGE,
Expand Down Expand Up @@ -2965,7 +2965,7 @@ describe('Spanner', () => {
if (IS_EMULATOR_ENABLED) {
this.skip();
}
if (SKIP_BACKUPS === 'true' || KOKORO_JOB_NAME?.includes('presubmit')) {
if (SKIP_BACKUPS === 'true') {
this.skip();
}
googleSqlDatabase1 = DATABASE;
Expand Down
Loading