Skip to content

Commit

Permalink
test: cleanup logic causes errors (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Jun 18, 2020
1 parent 3fe5d4c commit 6c6a804
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions packages/google-cloud-compute/system-test/compute.js
Original file line number Diff line number Diff line change
Expand Up @@ -1114,16 +1114,20 @@ describe('Compute', () => {

async function deleteAllTestObjects(opts) {
opts.name = opts.expiredOnly ? TESTS_PREFIX : FULL_PREFIX;
await deleteRegionalRules(opts);
await callAndDeleteGcloudTestObject('Rules', opts);
await deleteTargetProxies(opts);
await deleteUrlMaps(opts);
await callAndDeleteGcloudTestObject('Services', opts);
await deleteHttpsHealthChecks(opts);
await deleteInstanceGroupManagers(opts);
await deleteInstanceTemplates(opts);
await deleteTargetInstances(opts);
await deleteAllGcloudTestObjects(opts);
try {
await deleteRegionalRules(opts);
await callAndDeleteGcloudTestObject('Rules', opts);
await deleteTargetProxies(opts);
await deleteUrlMaps(opts);
await callAndDeleteGcloudTestObject('Services', opts);
await deleteHttpsHealthChecks(opts);
await deleteInstanceGroupManagers(opts);
await deleteInstanceTemplates(opts);
await deleteTargetInstances(opts);
await deleteAllGcloudTestObjects(opts);
} catch (err) {
console.warn(err);
}
}

async function deleteAllGcloudTestObjects(opts) {
Expand Down

0 comments on commit 6c6a804

Please sign in to comment.