Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
More precise diagnostics of cache volume
Browse files Browse the repository at this point in the history
  • Loading branch information
walac committed Sep 8, 2019
1 parent 2e3277d commit 319f544
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/integration/container_volume_caching_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ suite('volume cache tests', () => {
const failureInfo = `log:\n${result.log}`;
assert.equal(result.run.state, 'completed', failureInfo);
assert.equal(result.run.reasonResolved, 'completed', failureInfo);
assert.ok(result.log.indexOf(cacheName) !== -1, 'lists cache', failureInfo);
assert.ok(result.log.indexOf(cacheName) !== -1, '/tmp-obj-dir', failureInfo);
assert.notEqual(result.log.indexOf(cacheName), -1, 'lists cache', failureInfo);
assert.notEqual(result.log.indexOf(cacheName), -1, '/tmp-obj-dir', failureInfo);

var objDir = fs.readdirSync(fullCacheDir);
assert.ok(fs.existsSync(path.join(fullCacheDir, objDir[0], 'foo.txt')), failureInfo);
Expand Down Expand Up @@ -107,8 +107,8 @@ suite('volume cache tests', () => {
const failureInfo = `log:\n${result.log}`;
assert.equal(result.run.state, 'completed', failureInfo);
assert.equal(result.run.reasonResolved, 'completed', failureInfo);
assert.ok(result.log.indexOf(cacheName) !== -1, 'lists cache', failureInfo);
assert.ok(result.log.indexOf(cacheName) !== -1, '/tmp-obj-dir', failureInfo);
assert.notEqual(result.log.indexOf(cacheName), -1, 'lists cache', failureInfo);
assert.notEqual(result.log.indexOf(cacheName), -1, '/tmp-obj-dir', failureInfo);

var objDir = fs.readdirSync(fullCacheDir);
assert.ok(fs.existsSync(path.join(fullCacheDir, objDir[0], 'foo.txt')), failureInfo);
Expand Down Expand Up @@ -157,11 +157,11 @@ suite('volume cache tests', () => {
var results = await Promise.all(tasks);
await worker.terminate();

assert.ok(results.length === 2);
assert.ok(results[0].log.indexOf('file0.txt') !== -1);
assert.ok(results[0].log.indexOf('file1.txt') === -1);
assert.ok(results[1].log.indexOf('file1.txt') !== -1);
assert.ok(results[1].log.indexOf('file0.txt') === -1);
assert.equal(results.length, 2);
assert.notEqual(results[0].log.indexOf('file0.txt'), -1);
assert.equal(results[0].log.indexOf('file1.txt'), -1);
assert.notEqual(results[1].log.indexOf('file1.txt'), -1);
assert.equal(results[1].log.indexOf('file0.txt'), -1);
});

test('cached volumes can be reused between tasks', async () => {
Expand Down

0 comments on commit 319f544

Please sign in to comment.