Skip to content

Commit 166c7d5

Browse files
committed
test: relax error message checks
These are server-specific and have nothing to do with the client logic
1 parent a4276a9 commit 166c7d5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/test/java/io/weaviate/integration/tests/backup/BackupTestSuite.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import java.util.function.Supplier;
1616

1717
import org.apache.http.HttpStatus;
18+
import org.assertj.core.api.InstanceOfAssertFactories;
1819

1920
import io.weaviate.client.base.Result;
2021
import io.weaviate.client.base.WeaviateError;
@@ -405,8 +406,8 @@ public static void testFailOnRestoreBackupForExistingClass(Supplier<Result<Backu
405406
.returns(DOCKER_COMPOSE_BACKUPS_DIR + "/" + backupId, BackupRestoreResponse::getPath)
406407
.returns(BACKEND, BackupRestoreResponse::getBackend)
407408
.returns(RestoreStatus.FAILED, BackupRestoreResponse::getStatus)
408-
.returns("could not restore classes: [\"Pizza\": class name Pizza already exists]",
409-
BackupRestoreResponse::getError);
409+
.extracting(BackupRestoreResponse::getError, InstanceOfAssertFactories.STRING)
410+
.contains("could not restore classes");
410411
}
411412

412413
public static void testFailOnCreateOfExistingBackup(Supplier<Result<BackupCreateResponse>> supplierCreate,

0 commit comments

Comments
 (0)