SEARCH-569

- Updated indexVersion
This commit is contained in:
Keerthi Niranjan
2018-01-12 17:31:59 +05:30
parent 27cab1ab93
commit 253aee2ac6
4 changed files with 21 additions and 8 deletions

View File

@@ -58,7 +58,6 @@ describe('Tests for Search', function() {
realTimeIndexPath = path.join(userConfigDir, 'data', 'temp_realtime_index');
tempBatchPath = path.join(userConfigDir, 'data', 'temp_batch_indexes');
dataFolderPath = path.join(userConfigDir, 'data');
console.log(dataFolderPath);
if (fs.existsSync(dataFolderPath)) {
fs.unlinkSync(dataFolderPath)
}
@@ -70,7 +69,7 @@ describe('Tests for Search', function() {
setTimeout(function () {
deleteIndexFolders(dataFolderPath);
let root = path.join(searchConfig.FOLDERS_CONSTANTS.EXEC_PATH, '..', `${searchConfig.FOLDERS_CONSTANTS.PREFIX_NAME}_${userId}.enc`);
let root = path.join(userConfigDir, `${searchConfig.FOLDERS_CONSTANTS.PREFIX_NAME}_${userId}.enc`);
if (fs.existsSync(root)) {
fs.unlinkSync(root);
}

View File

@@ -124,6 +124,7 @@ describe('Tests for Search Utils', function() {
language: 'en'
};
SearchUtilsAPI.updateUserConfig(1234567891011, data).then(function (res) {
data.indexVersion = 'v1';
expect(res).toEqual(data);
done();
})
@@ -137,6 +138,7 @@ describe('Tests for Search Utils', function() {
};
SearchUtilsAPI.updateUserConfig(1234567891011, data).then(function (res) {
expect(res.rotationId).toEqual(1);
expect(res.indexVersion).toEqual('v1');
done();
})
});