Skip to content

Commit

Permalink
build: reenable tests (#3803)
Browse files Browse the repository at this point in the history
* reenable tests

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
sofisl and gcf-owl-bot[bot] authored Dec 21, 2022
1 parent 87c02e9 commit 46b4330
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
10 changes: 3 additions & 7 deletions packages/google-analytics-admin/samples/test/quickstart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const cwd = path.join(__dirname, '..');

describe.skip('Quickstart', async () => {
describe('Quickstart', async () => {
it('should run quickstart', async () => {
try {
execSync('node quickstart.js', {cwd});
} catch (err) {
// Since we don't have credentials, we need to assert this eror
assert.match(err, /insufficient authentication scopes/);
}
const output = execSync('node quickstart.js', {cwd});
assert(output != null);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

const GA4_PROPERTY_ID = process.env.GA4_PROPERTY_ID || '222596558';

describe.skip('Quickstart', () => {
describe('Quickstart', () => {
it('should run quickstart', async () => {
// eslint-disable-next-line no-unused-vars
const stdout = execSync(`node ./quickstart.js ${GA4_PROPERTY_ID}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {TablesServiceClient} = require('@google/area120-tables');

const client = new TablesServiceClient();

describe.skip('Quickstart', () => {
describe('Quickstart', () => {
let projectId;

before(async () => {
Expand Down
16 changes: 4 additions & 12 deletions packages/google-iam-credentials/samples/test/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,9 @@ const cwd = path.join(__dirname, '..');

describe('Quickstart', () => {
it('should run quickstart', async () => {
// We no longer use service account credentials, so we must assert an error
try {
execSync(
'node ./quickstart.js [email protected] https://www.googleapis.com/auth/iam',
{cwd}
);
} catch (err) {
assert.match(
err,
/Gaia id not found for email fake_account@long-door-651.iam.gserviceaccount.com/
);
}
const output = execSync(
'node ./quickstart.js [email protected] https://www.googleapis.com/auth/iam'
);
assert(output != null);
});
});

0 comments on commit 46b4330

Please sign in to comment.