Added IsValidLocator to filter /index output.
[arvados.git] / services / keep / keep_test.go
index 05eb410dd6c7c98db8f10cb434ba36a37d264170..2d1916ed25328b901318dbaa3c2e0a0a5ce6eb5b 100644 (file)
@@ -296,10 +296,14 @@ func TestIndex(t *testing.T) {
        defer teardown()
 
        // Set up Keep volumes and populate them.
+       // Include multiple blocks on different volumes, and
+       // some metadata files.
        KeepVolumes = setup(t, 2)
        store(t, KeepVolumes[0], TEST_HASH, TEST_BLOCK)
        store(t, KeepVolumes[1], TEST_HASH_2, TEST_BLOCK_2)
        store(t, KeepVolumes[0], TEST_HASH_3, TEST_BLOCK_3)
+       store(t, KeepVolumes[0], TEST_HASH+".meta", []byte("metadata"))
+       store(t, KeepVolumes[1], TEST_HASH_2+".meta", []byte("metadata"))
 
        index := IndexLocators("")
        expected := `^` + TEST_HASH + `\+\d+ \d+\n` +