MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / TestGetNEmpty

Function TestGetNEmpty

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

Source from the content-addressed store, hash-verified

561}
562
563func TestGetNEmpty(t *testing.T) {
564 kms.Unittest = true
565 utils.RemoveAll(testStorePath + "*")
566 kms.ResetBucket()
567
568 x, _ := InitConsistent(testStorePath, new(KMSStorage), false)
569 defer utils.RemoveAll(testStorePath + "*")
570 members, err := x.GetNeighbors("9999999", 5)
571 if err != ErrEmptyCircle {
572 t.Fatal(err)
573 }
574 if len(members) != 0 {
575 t.Errorf("expected 3 members instead of %d", len(members))
576 }
577}
578
579func TestGetNQuick(t *testing.T) {
580 kms.Unittest = true

Callers

nothing calls this directly

Calls 6

RemoveAllFunction · 0.92
ResetBucketFunction · 0.92
InitConsistentFunction · 0.85
GetNeighborsMethod · 0.80
FatalMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected