fix column key translation test

It previously checked hardcoded values.
This does not work due to shard width differences.
This commit is contained in:
Nia Weiss 2021-06-07 12:35:07 -04:00
parent 39337fa41b
commit c2f58f7af0
No known key found for this signature in database
GPG key ID: 895E83409BFDA1BB

View file

@ -713,16 +713,19 @@ func TestClientAgainstCluster(t *testing.T) {
setup(t, cli)
defer tearDown(t, cli)
trans, err := cli.CreateIndexKeys(testIndexKeyTranslation, "key1", "key2")
created, err := cli.CreateIndexKeys(testIndexKeyTranslation, "key1", "key2")
require.NoErrorf(t, err, "CreateIndexKeys")
if _, ok := created["key1"]; !ok {
t.Error("key1 missing")
}
if _, ok := created["key2"]; !ok {
t.Error("key2 missing")
}
target := map[string]uint64{"key1": 65011713, "key2": 63963137}
require.Equalf(t, target, trans, "CreateIndexKeys")
trans, err = cli.FindIndexKeys(testIndexKeyTranslation, "key1", "key2", "key3")
found, err := cli.FindIndexKeys(testIndexKeyTranslation, "key1", "key2", "key3")
require.NoErrorf(t, err, "FindIndexKeys")
require.Equalf(t, target, trans, "FindIndexKeys")
require.Equalf(t, created, found, "IndexKeys")
})
t.Run("Transactions", func(t *testing.T) {