(t *testing.T)
| 196 | } |
| 197 | |
| 198 | func TestGetMultiple(t *testing.T) { |
| 199 | kms.Unittest = true |
| 200 | utils.RemoveAll(testStorePath + "*") |
| 201 | kms.ResetBucket() |
| 202 | |
| 203 | x, _ := InitConsistent(testStorePath, new(KMSStorage), false) |
| 204 | defer utils.RemoveAll(testStorePath + "*") |
| 205 | x.Add(NewNodeFromString("0000000000000000000000000000000000000000000000000000000000000000")) |
| 206 | x.Add(NewNodeFromString("1111111111111111111111111111111111111111111111111111111111111111")) |
| 207 | x.Add(NewNodeFromString("2222222222222222222222222222222222222222222222222222222222222222")) |
| 208 | for i, v := range gmtests { |
| 209 | result, err := x.GetNeighbor(v.in) |
| 210 | if err != nil { |
| 211 | t.Fatal(err) |
| 212 | } |
| 213 | if string(result.ID) != v.out { |
| 214 | t.Errorf("%d. got %v, expected %v", i, result, v.out) |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | func TestGetMultipleQuick(t *testing.T) { |
| 220 | kms.Unittest = true |
nothing calls this directly
no test coverage detected