(projectId, region, diskName)
| 27 | const cwd = path.join(__dirname, '..'); |
| 28 | |
| 29 | async function deleteDisk(projectId, region, diskName) { |
| 30 | const disksClient = new computeLib.RegionDisksClient(); |
| 31 | const regionOperationsClient = new computeLib.RegionOperationsClient(); |
| 32 | |
| 33 | const [response] = await disksClient.delete({ |
| 34 | project: projectId, |
| 35 | disk: diskName, |
| 36 | region, |
| 37 | }); |
| 38 | let operation = response.latestResponse; |
| 39 | |
| 40 | console.log(`Deleting ${diskName}`); |
| 41 | |
| 42 | // Wait for the delete operation to complete. |
| 43 | while (operation.status !== 'DONE') { |
| 44 | [operation] = await regionOperationsClient.wait({ |
| 45 | operation: operation.name, |
| 46 | project: projectId, |
| 47 | region, |
| 48 | }); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | describe('Create compute regional replicated disk', async () => { |
| 53 | const diskName = `replicated-disk-${uuid.v4()}`; |
no outgoing calls
no test coverage detected