Skip to content

Commit 4668ab4

Browse files
committed
chore: lint&format
1 parent dedb297 commit 4668ab4

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/collections/backup/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ export const backup = (connection: Connection) => {
200200
}
201201
return status
202202
? {
203-
...parseResponse(res),
204-
...status,
205-
}
203+
...parseResponse(res),
204+
...status,
205+
}
206206
: parseResponse(res);
207207
},
208208
};

src/collections/backup/integration.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* eslint-disable @typescript-eslint/no-non-null-assertion */
22
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
33
/* eslint-disable no-await-in-loop */
4-
import { Backend } from '../../backup/index.js';
5-
import weaviate, { Collection, WeaviateClient } from '../../index.js';
64
import { requireAtLeast } from '../../../test/version';
5+
import { Backend } from '../../backup/index.js';
76
import { WeaviateBackupFailed } from '../../errors.js';
7+
import weaviate, { Collection, WeaviateClient } from '../../index.js';
88

99
// These must run sequentially because Weaviate is not capable of running multiple backups at the same time
1010
describe('Integration testing of backups', () => {
@@ -119,11 +119,10 @@ describe('Integration testing of backups', () => {
119119
.then(testCollectionNoWaitForCompletion));
120120

121121
requireAtLeast(1, 32, 3).describe('overwrite alias', () => {
122-
123122
test('overwriteAlias=true', async () => {
124123
const client = await clientPromise;
125124

126-
const things = await client.collections.create({ name: "ThingsTrue" });
125+
const things = await client.collections.create({ name: 'ThingsTrue' });
127126
await client.alias.create({ collection: things.name, alias: `${things.name}Alias` });
128127

129128
const backup = await client.backup.create({
@@ -137,10 +136,9 @@ describe('Integration testing of backups', () => {
137136
await client.alias.delete(`${things.name}Alias`);
138137

139138
// Change alias to point to a different collection
140-
const inventory = await client.collections.create({ name: "InventoryTrue" });
139+
const inventory = await client.collections.create({ name: 'InventoryTrue' });
141140
await client.alias.create({ collection: inventory.name, alias: `${things.name}Alias` });
142141

143-
144142
// Restore backup with overwriteAlias=true
145143
await client.backup.restore({
146144
backend: 'filesystem',
@@ -158,7 +156,7 @@ describe('Integration testing of backups', () => {
158156
test('overwriteAlias=false', async () => {
159157
const client = await clientPromise;
160158

161-
const things = await client.collections.create({ name: "ThingsFalse" });
159+
const things = await client.collections.create({ name: 'ThingsFalse' });
162160
await client.alias.create({ collection: things.name, alias: `${things.name}Alias` });
163161

164162
const backup = await client.backup.create({
@@ -172,10 +170,9 @@ describe('Integration testing of backups', () => {
172170
await client.alias.delete(`${things.name}Alias`);
173171

174172
// Change alias to point to a different collection
175-
const inventory = await client.collections.create({ name: "InventoryFalse" });
173+
const inventory = await client.collections.create({ name: 'InventoryFalse' });
176174
await client.alias.create({ collection: inventory.name, alias: `${things.name}Alias` });
177175

178-
179176
// Restore backup with overwriteAlias=true
180177
const restored = client.backup.restore({
181178
backend: 'filesystem',
@@ -190,13 +187,16 @@ describe('Integration testing of backups', () => {
190187
});
191188

192189
it('cleanup', async () => {
193-
await clientPromise.then(async c => {
194-
await Promise.all(["ThingsTrue", "ThingsFalse", "InventoryTrue", "InventoryFalse"]
195-
.map(name => c.collections.delete(name).catch(e => { })));
196-
await c.alias.delete("ThingsFalseAlias").catch(e => { });
197-
await c.alias.delete("ThingsTrueAlias").catch(e => { });
190+
await clientPromise.then(async (c) => {
191+
await Promise.all(
192+
['ThingsTrue', 'ThingsFalse', 'InventoryTrue', 'InventoryFalse'].map((name) =>
193+
c.collections.delete(name).catch((e) => {})
194+
)
195+
);
196+
await c.alias.delete('ThingsFalseAlias').catch((e) => {});
197+
await c.alias.delete('ThingsTrueAlias').catch((e) => {});
198198
});
199-
})
199+
});
200200
});
201201
});
202202

src/collections/backup/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export type BackupConfigCreate = {
3737
export type BackupConfigRestore = {
3838
/** The percentage of CPU to use for the backuop restoration job. */
3939
cpuPercentage?: number;
40-
/**Allows ovewriting the collection alias if there is a conflict. */
40+
/** Allows ovewriting the collection alias if there is a conflict. */
4141
overwriteAlias?: boolean;
4242
};
4343

0 commit comments

Comments
 (0)