Skip to content

Commit 5c19fc2

Browse files
authored
Merge pull request #93 from semi-technologies/backup_test_fix_WVT-363_rebased
fix backup tests
2 parents 81ab020 + 0051671 commit 5c19fc2

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

backup/journey.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,12 @@ describe("fail restoring backup for existing class", () => {
456456
.withIncludeClassNames(PIZZA_CLASS_NAME)
457457
.withBackend(BACKEND)
458458
.withBackupId(BACKUP_ID)
459+
.withWaitForCompletion(true)
459460
.do()
460-
.then(() => fail("should fail on restore backup"))
461-
.catch(err => {
462-
expect(err).toContain(422);
463-
expect(err).toContain(PIZZA_CLASS_NAME);
461+
.then(resp => {
462+
expect(resp.error).toContain("already exists");
463+
expect(resp.error).toContain(PIZZA_CLASS_NAME);
464+
expect(resp.status).toBe(weaviate.backup.RestoreStatus.FAILED);
464465
});
465466
});
466467

@@ -586,7 +587,6 @@ describe("fail checking restore status for not started restore", () => {
586587
.then(() => fail("should fail on restore status"))
587588
.catch(err => {
588589
expect(err).toContain(404);
589-
expect(err).toContain(BACKEND);
590590
expect(err).toContain(BACKUP_ID);
591591
});
592592
});
@@ -731,11 +731,11 @@ function assertThatAllSoupsExist(client) {
731731

732732
function assertThatAllFoodObjectsExist(client, className, number) {
733733
return client.graphql.get()
734-
.withClassName(className)
735-
.withFields("name")
736-
.do()
737-
.then(data => expect(data.data.Get[className].length).toBe(number))
738-
.catch(err => fail(number + " objects should exist: " + err));
734+
.withClassName(className)
735+
.withFields("name")
736+
.do()
737+
.then(data => expect(data.data.Get[className].length).toBe(number))
738+
.catch(err => fail(number + " objects should exist: " + err));
739739
}
740740

741741
function randomBackupId() {

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.4'
22
services:
33
weaviate:
4-
image: semitechnologies/weaviate:1.15.2
4+
image: semitechnologies/weaviate:latest@sha256:6b4d510d59f57bd00d6b1cb5957db2bc80963e59355cd4dc8935c7c6f2df4559
55
restart: on-failure:0
66
ports:
77
- "8080:8080"
@@ -13,6 +13,8 @@ services:
1313
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
1414
ENABLE_MODULES: text2vec-contextionary,backup-filesystem
1515
BACKUP_FILESYSTEM_PATH: "/tmp/backups"
16+
CLUSTER_GOSSIP_BIND_PORT: "7100"
17+
CLUSTER_DATA_BIND_PORT: "7101"
1618
contextionary:
1719
image: semitechnologies/contextionary:en0.16.0-v1.1.0
1820
ports:

misc/journey.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const weaviate = require("../index");
2+
23
describe("misc endpoints", () => {
34
const client = weaviate.client({
45
scheme: "http",

0 commit comments

Comments
 (0)