MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestRemove

Function TestRemove

consistent/consistent_test.go:101–112  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestRemove(t *testing.T) {
102 kms.Unittest = true
103 utils.RemoveAll(testStorePath + "*")
104 kms.ResetBucket()
105
106 x, _ := InitConsistent(testStorePath, new(KMSStorage), false)
107 defer utils.RemoveAll(testStorePath + "*")
108 x.Add(NewNodeFromString("0000000000000000000000000000000000000000000000000000000000000000"))
109 x.Remove("0000000000000000000000000000000000000000000000000000000000000000")
110 CheckNum(len(x.circle), 0, t)
111 CheckNum(len(x.sortedHashes), 0, t)
112}
113
114func TestRemoveNonExisting(t *testing.T) {
115 kms.Unittest = true

Callers

nothing calls this directly

Calls 7

RemoveAllFunction · 0.92
ResetBucketFunction · 0.92
InitConsistentFunction · 0.85
NewNodeFromStringFunction · 0.85
CheckNumFunction · 0.70
AddMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected