MCPcopy Index your code
hub / github.com/dnote/dnote / TestSync_Empty

Function TestSync_Empty

pkg/e2e/sync/basic_test.go:31–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29)
30
31func TestSync_Empty(t *testing.T) {
32 setup := func(t *testing.T, env testEnv, user database.User) map[string]string {
33 return map[string]string{}
34 }
35
36 assert := func(t *testing.T, env testEnv, user database.User, ids map[string]string) {
37 // Test
38 checkState(t, env.DB, user, env.ServerDB, systemState{
39 clientNoteCount: 0,
40 clientBookCount: 0,
41 clientLastMaxUSN: 0,
42 clientLastSyncAt: serverTime.Unix(),
43 serverNoteCount: 0,
44 serverBookCount: 0,
45 serverUserMaxUSN: 0,
46 })
47 }
48
49 testSyncCmd(t, false, setup, assert)
50 testSyncCmd(t, true, setup, assert)
51}
52
53func TestSync_oneway(t *testing.T) {
54 t.Run("cli to api only", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

checkStateFunction · 0.85
testSyncCmdFunction · 0.85

Tested by

no test coverage detected