Skip to content

Commit

Permalink
CNR Completed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Rıza Kat committed Oct 15, 2024
1 parent 571006a commit 129c096
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion test/tests_bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,48 @@ describe("Bulk Tests", () => {
done();
}, hp.mWait);
});

it("12- CNR_cPath_persistTrue_file", (done) => {
var bulk = new CountlyBulk({
app_key: appKey,
url: serverUrl,
storage_type: StorageTypes.FILE,
storage_path: "../test/customStorageDirectory/",
persist_queue: true,
});
assert.equal(storage.getStoragePath(), "../test/customStorageDirectory/");
shouldFilesExist(true);
createBulkData(bulk);

setTimeout(() => {
validateCreatedBulkData(bulk);
shouldFilesExist(true);
assert.equal(storage.getStoragePath(), "../test/customStorageDirectory/");
done();
}, hp.mWait);
});

it("13- CNR_cPath_persistFalse_file", (done) => {
var bulk = new CountlyBulk({
app_key: appKey,
url: serverUrl,
storage_type: StorageTypes.FILE,
storage_path: "../test/customStorageDirectory/",
persist_queue: false,
});
assert.equal(storage.getStoragePath(), "../test/customStorageDirectory/");
shouldFilesExist(true);
createBulkData(bulk);

setTimeout(() => {
validateCreatedBulkData(bulk);
shouldFilesExist(true);
assert.equal(storage.getStoragePath(), "../test/customStorageDirectory/");
done();
}, hp.mWait);
});
});

// Currently tested: CNR, CNR_cPath_file, CNR_file
// TODO: Add tests for the following:
// - CNR: cPath_persistTrue_file, cPath_persistFalse_file
// - CR_CG for all of the above

0 comments on commit 129c096

Please sign in to comment.