renamed 'delete' to 'remove'

This commit is contained in:
2021-06-07 12:06:35 -05:00
parent 98cb50533d
commit 0330f8a2b5
4 changed files with 17 additions and 16 deletions

View File

@@ -152,7 +152,7 @@ test('can get directory list and snapshot using api', async () => {
await conn.disconnect();
});
test('can create, close and delete a file using api', async () => {
test('can create, close and remove a file using api', async () => {
const conn = await repertory.create_pool(
2,
TEST_HOST,
@@ -169,12 +169,12 @@ test('can create, close and delete a file using api', async () => {
expect(await f.close()).toEqual(0);
expect(f.handle).toBeNull();
expect(await api.file.delete('/repertory_file.dat')).toEqual(0);
expect(await api.file.remove('/repertory_file.dat')).toEqual(0);
await conn.disconnect();
});
test('can open, close and delete a file using api', async () => {
test('can open, close and remove a file using api', async () => {
const conn = await repertory.create_pool(
2,
TEST_HOST,
@@ -194,7 +194,7 @@ test('can open, close and delete a file using api', async () => {
expect(await f.close()).toEqual(0);
expect(f.handle).toBeNull();
expect(await api.file.delete('/repertory_file.dat')).toEqual(0);
expect(await api.file.remove('/repertory_file.dat')).toEqual(0);
await conn.disconnect();
});
@@ -221,7 +221,7 @@ test('can write to and read from a file using api', async () => {
expect(buffer.compare(buffer2)).toEqual(0);
expect(await f.close()).toEqual(0);
expect(await api.file.delete('/repertory_file.dat')).toEqual(0);
expect(await api.file.remove('/repertory_file.dat')).toEqual(0);
await conn.disconnect();
});
@@ -243,7 +243,7 @@ test('can truncate a file using api', async () => {
expect(new Uint64BE(await f.get_size()).toNumber()).toEqual(0);
expect(await f.close()).toEqual(0);
expect(await api.file.delete('/repertory_file.dat')).toEqual(0);
expect(await api.file.remove('/repertory_file.dat')).toEqual(0);
await conn.disconnect();
});
@@ -282,7 +282,7 @@ test('can upload and download a file using api', async () => {
expect(await api.directory.exists('/repertory_test.dat')).toEqual(false);
expect(await api.file.exists('/repertory_test.dat')).toEqual(true);
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
fs.unlinkSync('repertory_test.dat');
await conn.disconnect();
@@ -323,7 +323,7 @@ test('can download and overwrite a file using api', async () => {
)
).toBeTruthy();
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
fs.unlinkSync('repertory_test.dat');
await conn.disconnect();
@@ -364,7 +364,7 @@ test('download fails if overwrite is false using api', async () => {
)
).rejects.toThrow(Error);
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
fs.unlinkSync('repertory_test.dat');
await conn.disconnect();
@@ -395,7 +395,7 @@ test('can upload and overwrite a file using api', async () => {
)
).toBeTruthy();
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
await conn.disconnect();
}, 60000);
@@ -425,7 +425,7 @@ test('upload fails if overwrite is false using api', async () => {
)
).rejects.toThrow(Error);
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
await conn.disconnect();
}, 60000);
@@ -467,7 +467,7 @@ test('can resume download using api', async () => {
await calculate_sha256('repertory_test.dat')
);
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
fs.unlinkSync('repertory_test.dat');
await conn.disconnect();
@@ -517,7 +517,7 @@ test('can resume upload using api', async () => {
await calculate_sha256('repertory_test.dat')
);
expect(await api.file.delete('/repertory_test.dat')).toEqual(0);
expect(await api.file.remove('/repertory_test.dat')).toEqual(0);
fs.unlinkSync('repertory_test.dat');
await conn.disconnect();