MCPcopy
hub / github.com/ha/doozerd / TestNodeApplySet

Function TestNodeApplySet

src/pkg/store/node_test.go:9–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestNodeApplySet(t *testing.T) {
10 k, v, seqn, rev := "x", "a", int64(1), int64(1)
11 p := "/" + k
12 m := MustEncodeSet(p, v, Clobber)
13 n, e := emptyDir.apply(seqn, m)
14 exp := node{"", Dir, map[string]node{k: {v, rev, nil}}}
15 assert.Equal(t, exp, n)
16 assert.Equal(t, Event{seqn, p, v, rev, m, nil, n}, e)
17}
18
19func TestNodeApplyDel(t *testing.T) {
20 k, seqn, rev := "x", int64(1), int64(1)

Callers

nothing calls this directly

Calls 2

MustEncodeSetFunction · 0.85
applyMethod · 0.80

Tested by

no test coverage detected