Skip to content

Commit cdc663a

Browse files
fix(bigquery): update principalId content
1 parent edab26d commit cdc663a

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

bigquery/cloud-client/test/revokeDatasetAccess.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@ describe('revokeDatasetAccess', () => {
3636
sinon.stub(console, 'error');
3737
});
3838

39-
// Clean up after all tests
39+
// Clean up after all tests.
4040
afterEach(async () => {
4141
await cleanupResources(datasetId);
4242
console.log.restore();
4343
console.error.restore();
4444
});
4545

4646
it('should revoke access to a dataset', async () => {
47-
// First grant access to the dataset
47+
// Grant access to the dataset.
4848
await grantAccessToDataset(datasetId, entityId, role);
4949

5050
// Reset console.log stub to clear the history of calls
5151
console.log.resetHistory();
5252

53-
// Now revoke access
53+
// Now revoke access.
5454
await revokeDatasetAccess(datasetId, entityId);
5555

56-
// Check if the right message was logged
56+
// Check if the right message was logged.
5757
assert.strictEqual(
5858
console.log.calledWith(
5959
`Revoked access to '${entityId}' from '${datasetId}'.`

bigquery/cloud-client/test/revokeTableOrViewAccess.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ describe('revokeTableOrViewAccess', () => {
4646
});
4747

4848
it('should revoke access to a table for a specific role', async () => {
49-
const principalId = `group: ${entityId}`;
49+
const principalId = `group:${entityId}`;
5050

51-
// Grant access first
51+
// Grant access first.
5252
await grantAccessToTableOrView(
5353
projectId,
5454
datasetId,
@@ -57,10 +57,10 @@ describe('revokeTableOrViewAccess', () => {
5757
roleId
5858
);
5959

60-
// Reset console log history
60+
// Reset console log history.
6161
console.log.resetHistory();
6262

63-
// Revoke access for the role
63+
// Revoke access for the role.
6464
await revokeAccessToTableOrView(
6565
projectId,
6666
datasetId,
@@ -69,7 +69,7 @@ describe('revokeTableOrViewAccess', () => {
6969
null
7070
);
7171

72-
// Check that the right message was logged
72+
// Check that the right message was logged.
7373
assert.strictEqual(
7474
console.log.calledWith(
7575
`Role '${roleId}' revoked for all principals on resource '${datasetId}.${tableId}'.`
@@ -79,9 +79,9 @@ describe('revokeTableOrViewAccess', () => {
7979
});
8080

8181
it('should revoke access to a table for a specific principal', async () => {
82-
const principalId = `group: ${entityId}`;
82+
const principalId = `group:${entityId}`;
8383

84-
// Grant access first
84+
// Grant access first.
8585
await grantAccessToTableOrView(
8686
projectId,
8787
datasetId,
@@ -90,10 +90,10 @@ describe('revokeTableOrViewAccess', () => {
9090
roleId
9191
);
9292

93-
// Reset console log history
93+
// Reset console log history.
9494
console.log.resetHistory();
9595

96-
// Revoke access for the principal
96+
// Revoke access for the principal.
9797
await revokeAccessToTableOrView(
9898
projectId,
9999
datasetId,
@@ -102,7 +102,7 @@ describe('revokeTableOrViewAccess', () => {
102102
principalId
103103
);
104104

105-
// Check that the right message was logged
105+
// Check that the right message was logged.
106106
assert.strictEqual(
107107
console.log.calledWith(
108108
`Access revoked for principal '${principalId}' on resource '${datasetId}.${tableId}'.`

0 commit comments

Comments
 (0)