Skip to content

Commit

Permalink
fix 641: remove vm after test (#644)
Browse files Browse the repository at this point in the history
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
wutonggg and sofisl authored Sep 2, 2022
1 parent 273d0e7 commit d28f3ce
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion asset/snippets/test/sample.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ describe('quickstart sample tests', () => {
await bucket.create();
await bigquery.createDataset(datasetId, options);
await bigquery.dataset(datasetId).exists();
// [vm] = await zone.vm(vmName, {os: 'ubuntu'});

const [response] = await instancesClient.insert({
instanceResource: {
Expand Down Expand Up @@ -107,6 +106,22 @@ describe('quickstart sample tests', () => {
after(async () => {
await bucket.delete();
await bigquery.dataset(datasetId).delete({force: true}).catch(console.warn);
const [response] = await instancesClient.delete({
instance: instanceName,
project: projectId,
zone,
});
let operation = response.latestResponse;
const operationsClient = new compute.ZoneOperationsClient();

// Wait for the delete operation to complete.
while (operation.status !== 'DONE') {
[operation] = await operationsClient.wait({
operation: operation.name,
project: projectId,
zone: operation.zone.split('/').pop(),
});
}
});

it('should export assets to specified path', async () => {
Expand Down

0 comments on commit d28f3ce

Please sign in to comment.