Update tests
This commit is contained in:
parent
64ca5a82ef
commit
0e3e5a99cd
1 changed files with 180 additions and 87 deletions
|
|
@ -0,0 +1,29 @@
|
|||
import type { TestDefinition } from "../test-definition";
|
||||
|
||||
export const onlineCreateUpdateWhileOtherCreatesSamePathTest: TestDefinition = {
|
||||
description:
|
||||
"Client 0 creates a binary file and updates it while client 1 also " +
|
||||
"creates a binary file at the same path. Both clients are online. " +
|
||||
"Both clients must end up with the same file set.",
|
||||
clients: 2,
|
||||
steps: [
|
||||
{ type: "enable-sync", client: 0 },
|
||||
{ type: "enable-sync", client: 1 },
|
||||
|
||||
{ type: "pause-websocket", client: 1 },
|
||||
{ type: "create", client: 0, path: "data.bin", content: "BINARY:content-v1" },
|
||||
{ type: "update", client: 0, path: "data.bin", content: "BINARY:content-v2" },
|
||||
{ type: "create", client: 1, path: "data.bin", content: "BINARY:other-content" },
|
||||
{ type: "resume-websocket", client: 1 },
|
||||
|
||||
{ type: "barrier" },
|
||||
|
||||
{
|
||||
type: "assert-consistent", verify: (state) => {
|
||||
state.assertFileCount(2)
|
||||
.assertContains("data.bin", "content-v2")
|
||||
.assertContains("data (1).bin", "other-content");
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
Loading…
Reference in a new issue