From 628d74f78442d2160e4ff4222de7043ac9d9c00b Mon Sep 17 00:00:00 2001 From: GPortas Date: Fri, 20 Oct 2023 12:26:15 +0100 Subject: [PATCH] Fixed: getDatasetLocks integration test --- test/integration/datasets/DatasetsRepository.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/integration/datasets/DatasetsRepository.test.ts b/test/integration/datasets/DatasetsRepository.test.ts index 9c6d174c..d6215363 100644 --- a/test/integration/datasets/DatasetsRepository.test.ts +++ b/test/integration/datasets/DatasetsRepository.test.ts @@ -168,18 +168,17 @@ describe('DatasetsRepository', () => { describe('getDatasetLocks', () => { test('should return list of dataset locks by dataset id for a dataset while publishing', async () => { + let createdDatasetId = undefined; // We create a new dataset await createDatasetViaApi() - .then() + .then((response) => (createdDatasetId = response.data.data.id)) .catch(() => { assert.fail('Error while creating test Dataset'); }); - const createdDatasetId = 3; // We publish the new test dataset so it will create a lock during publishing await publishDatasetViaApi(createdDatasetId) .then() - .catch((error) => { - console.log(error); + .catch(() => { assert.fail('Error while publishing test Dataset'); }); const actual = await sut.getDatasetLocks(createdDatasetId);