| 95 | }; |
| 96 | |
| 97 | const deleteRegionDisk = async (projectId, region, diskName) => { |
| 98 | const [response] = await regionDisksClient.delete({ |
| 99 | project: projectId, |
| 100 | region, |
| 101 | disk: diskName, |
| 102 | }); |
| 103 | let operation = response.latestResponse; |
| 104 | const operationsClient = new compute.RegionOperationsClient(); |
| 105 | |
| 106 | while (operation.status !== 'DONE') { |
| 107 | [operation] = await operationsClient.wait({ |
| 108 | operation: operation.name, |
| 109 | project: projectId, |
| 110 | region: operation.region.split('/').pop(), |
| 111 | }); |
| 112 | } |
| 113 | }; |
| 114 | |
| 115 | describe('snapshots tests', () => { |
| 116 | const diskName = `gcloud-test-disk-${uuid.v4().split('-')[0]}`; |