Skip to content

Commit

Permalink
updating system tests to accommodate version update
Browse files Browse the repository at this point in the history
  • Loading branch information
loferris committed Aug 17, 2023
1 parent 2008aef commit 1c78ba0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion system-test/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,15 @@ describe('BigQuery', () => {
});

const deleteBucketPromises = buckets
.filter(bucket => isResourceStale(bucket.metadata.timeCreated))
.filter(bucket => {
try {
if (typeof bucket.metadata.timeCreated === 'string') {
isResourceStale(bucket.metadata.timeCreated);
}
} catch {
throw Error('timeCreated on type BucketMetadata cannot be undefined');
}
})
.map(async b => {
const [files] = await b.getFiles();
await Promise.all(files.map(f => f.delete()));
Expand Down

0 comments on commit 1c78ba0

Please sign in to comment.