MCPcopy Create free account
hub / github.com/dadgar/onecache / TestTouchRemoteInvalid

Function TestTouchRemoteInvalid

onecache/onecache_rpc_test.go:154–169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func TestTouchRemoteInvalid(t *testing.T) {
155 nodes, err := connectedTestNodes(2, 1)
156 defer tearDownNodes(nodes)
157 if err != nil {
158 t.Fatalf("connectedTestNodes(2, 1) failed: %v", err)
159 }
160
161 n1 := nodes[0]
162 n2 := nodes[1]
163
164 var resp struct{}
165 args := StorageArgs{Key: "foo", Exp: 10, ExplicitPeer: n2.name}
166 if err := n1.server.Touch(args, &resp); err == nil {
167 t.Errorf("Touch(%+v) didn't return error", args)
168 }
169}
170
171func TestRemoveRemote(t *testing.T) {
172 nodes, err := connectedTestNodes(2, 1)

Callers

nothing calls this directly

Calls 3

connectedTestNodesFunction · 0.85
tearDownNodesFunction · 0.85
TouchMethod · 0.45

Tested by

no test coverage detected