Commit 2048aa3b authored by Sid Stenersen's avatar Sid Stenersen
Browse files

Fix unit test problems

parent 3496875b
Pipeline #34583 failed with stages
in 24 seconds
......@@ -130,15 +130,15 @@ export class DatasetDAO {
if (wmode !== Config.LS_MODE.DATASETS && !pagination.cursor) {
// Retrieve directories
let query = journalClient.createQuery(
const query = journalClient.createQuery(
Config.SEISMIC_STORE_NS + '-' + dataset.tenant + '-' + dataset.subproject, Config.DATASETS_KIND)
.select(['path']).groupBy('path').filter('path', '>', dataset.path).filter('path', '<', dataset.path + '\ufffd');
const [entitieshy] = await journalClient.runQuery(query);
output.datasets = entitieshy.map((entity) => (entity.path as string).substr(dataset.path.length));
output.datasets = entitieshy.map((entity) => ((entity.path || '') as string).substr(dataset.path.length));
output.datasets = output.datasets.map(
(entity) => entity.substr(0, entity.indexOf('/') + 1)).filter(
(elem, index, self) => index === self.indexOf(elem) );
(elem, index, self) => index === self.indexOf(elem));
}
if (wmode !== Config.LS_MODE.DIRS) {
......
// ============================================================================
// Copyright 2017-2019, Schlumberger
// Copyright 2017-2021 Schlumberger
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -588,7 +588,7 @@ export class TestDataset {
Tx.checkTrue(
JSON.stringify(result.datasets) === JSON.stringify(
['dataset01']) && JSON.stringify(result.directories) === JSON.stringify(['a', 'd']), done);
['dataset01']) && JSON.stringify(result.directories) === JSON.stringify(['a/', 'd/']), done);
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment