Skip to content

Commit 4f29cd7

Browse files
authoredNov 5, 2020
fix(test): on cleanup explicitly target environment instead of alias (#533)
1 parent 2fbb35e commit 4f29cd7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎test/integration/integration-tests.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,13 @@ test('Logs request and response with custom loggers', (t) => {
387387
test('gets V2 space for tag tests', (t) => {
388388
v2Client.getSpace('w6xueg32zr68').then((space) => {
389389
tagTests(t, space)
390-
test.onFinish(() => deleteAllTags(space, 'master'))
390+
test.onFinish(() => deleteAllTags(space))
391391
})
392392
})
393393

394-
async function deleteAllTags(space, environmentName) {
395-
const environment = await space.getEnvironment(environmentName)
394+
async function deleteAllTags(space) {
395+
const environmentAsAlias = await space.getEnvironment('master')
396+
const environment = await space.getEnvironment(environmentAsAlias.sys.aliasedEnvironment.sys.id)
396397
const tags = await environment.getTags(0, 1000)
397398
for (let index = 0; index < tags.total; index++) {
398399
await tags.items[index]['delete']()

0 commit comments

Comments
 (0)
Please sign in to comment.