From 202e7f06e2fb98a443f58d6dd856dbab47bf34a5 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Tue, 14 Jan 2025 09:42:20 -0500 Subject: [PATCH] test: cleanup and tweak batch test One of the test cases has been rendered redundant so it has been removed. Another test was changed to overwrite a file as it's expected to already exist. --- tools/api-tester/tests/batch.js | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/tools/api-tester/tests/batch.js b/tools/api-tester/tests/batch.js index 05b56bf9..228a26c3 100644 --- a/tools/api-tester/tests/batch.js +++ b/tools/api-tester/tests/batch.js @@ -21,9 +21,7 @@ module.exports = { }, ], [ 'file 1 contents', - 'file 2 contents', ]); - console.log('res?', results) expect(results.length).equal(2); expect(results[0].name).equal('w'); expect(results[1].path).equal(t.resolve('q/w/file_1.txt')); @@ -60,28 +58,6 @@ module.exports = { } }); - await t.case('path reference resolution (without dedupe)', async () => { - results = null; - results = await t.batch('batch', [ - { - op: 'mkdir', - as: 'dest_1', - path: t.resolve('q/w'), - create_missing_parents: true, - }, - { - op: 'write', - path: t.resolve('$dest_1/file_1.txt'), - }, - ], [ - 'file 1 contents', - ]); - console.log('res?', results) - expect(results.length).equal(2); - expect(results[0].name).equal('w'); - expect(results[1].path).equal(t.resolve('q/w/file_1.txt')); - }); - // Test for path reference resolution await t.case('path reference resolution', async () => { results = null; @@ -94,11 +70,11 @@ module.exports = { }, { op: 'write', + overwrite: true, path: t.resolve('$dest_1/file_1.txt'), }, ], [ 'file 1 contents', - 'file 2 contents', ]); console.log('res?', results) expect(results.length).equal(2);