Move remote disk StorageAPI abstraction from RPC to REST (#6464)

This commit is contained in:
Krishna Srinivas
2018-10-04 17:44:06 -07:00
committed by kannappanr
parent 670f9788e3
commit 81bee93b8d
12 changed files with 945 additions and 633 deletions

View File

@@ -470,3 +470,25 @@ func TestIsErrIgnored(t *testing.T) {
}
}
}
// Test queries()
func TestQueries(t *testing.T) {
var testCases = []struct {
keys []string
keyvalues []string
}{
{
[]string{"aaaa", "bbbb"},
[]string{"aaaa", "{aaaa:.*}", "bbbb", "{bbbb:.*}"},
},
}
for i, test := range testCases {
keyvalues := restQueries(test.keys...)
for j := range keyvalues {
if keyvalues[j] != test.keyvalues[j] {
t.Fatalf("test %d: keyvalues[%d] does not match", i+1, j)
}
}
}
}