From c2f58f7af0767ca1c207f6db7e024533dbc8c2b3 Mon Sep 17 00:00:00 2001 From: Nia Weiss Date: Mon, 7 Jun 2021 12:35:07 -0400 Subject: [PATCH] fix column key translation test It previously checked hardcoded values. This does not work due to shard width differences. --- client/client_it_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/client/client_it_test.go b/client/client_it_test.go index d0c2b9fac..e6a88af5b 100644 --- a/client/client_it_test.go +++ b/client/client_it_test.go @@ -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) {