Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
This commit is contained in:
parent
feb02197c1
commit
2da8e34079
2 changed files with 15 additions and 12 deletions
|
@ -59,6 +59,11 @@ func TestTruncIndex(t *testing.T) {
|
|||
assertIndexGet(t, index, id[:4], "", true)
|
||||
assertIndexGet(t, index, id[:1], "", true)
|
||||
|
||||
// An ambiguous id prefix should return an error
|
||||
if _, err := index.Get(id[:4]); err == nil || err == nil {
|
||||
t.Fatal("An ambiguous id prefix should return an error")
|
||||
}
|
||||
|
||||
// 7 characters should NOT conflict
|
||||
assertIndexGet(t, index, id[:7], id, false)
|
||||
assertIndexGet(t, index, id2[:7], id2, false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue