From 585047172b796812885fa33262eed5eda8532cc1 Mon Sep 17 00:00:00 2001 From: Andrew Sisley Date: Tue, 22 Oct 2024 15:07:38 -0400 Subject: [PATCH] WIP - Migrate tests to CidIndex --- .../integration/query/commits/simple_test.go | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/integration/query/commits/simple_test.go b/tests/integration/query/commits/simple_test.go index 6a69578ada..490eb03a89 100644 --- a/tests/integration/query/commits/simple_test.go +++ b/tests/integration/query/commits/simple_test.go @@ -37,13 +37,13 @@ func TestQueryCommits(t *testing.T) { Results: map[string]any{ "commits": []map[string]any{ { - "cid": "bafyreif6dqbkr7t37jcjfxxrjnxt7cspxzvs7qwlbtjca57cc663he4s7e", + "cid": testUtils.NewCidIndex(0, 0, "1", 0), }, { - "cid": "bafyreigtnj6ntulcilkmin4pgukjwv3nwglqpiiyddz3dyfexdbltze7sy", + "cid": testUtils.NewCidIndex(0, 0, "2", 0), }, { - "cid": "bafyreia2vlbfkcbyogdjzmbqcjneabwwwtw7ti2xbd7yor5mbu2sk4pcoy", + "cid": testUtils.NewCompCidIndex(0, 0, 0), }, }, }, @@ -364,7 +364,7 @@ func TestQuery_CommitsWithAllFieldsWithUpdate_NoError(t *testing.T) { Results: map[string]any{ "commits": []map[string]any{ { - "cid": "bafyreih5h6i6ohfsgrcjtg76iarebqcurpaft73gpobl2z2cfsvihsgdqu", + "cid": testUtils.NewCidIndex(0, 0, "1", 1), "collectionID": int64(1), "delta": testUtils.CBORValue(22), "docID": "bae-c9fb0fa4-1195-589c-aa54-e68333fb90b3", @@ -373,13 +373,13 @@ func TestQuery_CommitsWithAllFieldsWithUpdate_NoError(t *testing.T) { "height": int64(2), "links": []map[string]any{ { - "cid": "bafyreif6dqbkr7t37jcjfxxrjnxt7cspxzvs7qwlbtjca57cc663he4s7e", + "cid": testUtils.NewCidIndex(0, 0, "1", 0), "name": "_head", }, }, }, { - "cid": "bafyreif6dqbkr7t37jcjfxxrjnxt7cspxzvs7qwlbtjca57cc663he4s7e", + "cid": testUtils.NewCidIndex(0, 0, "1", 0), "collectionID": int64(1), "delta": testUtils.CBORValue(21), "docID": "bae-c9fb0fa4-1195-589c-aa54-e68333fb90b3", @@ -389,7 +389,7 @@ func TestQuery_CommitsWithAllFieldsWithUpdate_NoError(t *testing.T) { "links": []map[string]any{}, }, { - "cid": "bafyreigtnj6ntulcilkmin4pgukjwv3nwglqpiiyddz3dyfexdbltze7sy", + "cid": testUtils.NewCidIndex(0, 0, "2", 0), "collectionID": int64(1), "delta": testUtils.CBORValue("John"), "docID": "bae-c9fb0fa4-1195-589c-aa54-e68333fb90b3", @@ -399,7 +399,7 @@ func TestQuery_CommitsWithAllFieldsWithUpdate_NoError(t *testing.T) { "links": []map[string]any{}, }, { - "cid": "bafyreiale6qsjc7qewod3c6h2odwamfwcf7vt4zlqtw7ldcm57xdkgxja4", + "cid": testUtils.NewCompCidIndex(0, 0, 1), "collectionID": int64(1), "delta": nil, "docID": "bae-c9fb0fa4-1195-589c-aa54-e68333fb90b3", @@ -408,17 +408,17 @@ func TestQuery_CommitsWithAllFieldsWithUpdate_NoError(t *testing.T) { "height": int64(2), "links": []map[string]any{ { - "cid": "bafyreia2vlbfkcbyogdjzmbqcjneabwwwtw7ti2xbd7yor5mbu2sk4pcoy", + "cid": testUtils.NewCompCidIndex(0, 0, 0), "name": "_head", }, { - "cid": "bafyreih5h6i6ohfsgrcjtg76iarebqcurpaft73gpobl2z2cfsvihsgdqu", + "cid": testUtils.NewCidIndex(0, 0, "1", 1), "name": "age", }, }, }, { - "cid": "bafyreia2vlbfkcbyogdjzmbqcjneabwwwtw7ti2xbd7yor5mbu2sk4pcoy", + "cid": testUtils.NewCompCidIndex(0, 0, 0), "collectionID": int64(1), "delta": nil, "docID": "bae-c9fb0fa4-1195-589c-aa54-e68333fb90b3", @@ -427,11 +427,11 @@ func TestQuery_CommitsWithAllFieldsWithUpdate_NoError(t *testing.T) { "height": int64(1), "links": []map[string]any{ { - "cid": "bafyreif6dqbkr7t37jcjfxxrjnxt7cspxzvs7qwlbtjca57cc663he4s7e", + "cid": testUtils.NewCidIndex(0, 0, "1", 0), "name": "age", }, { - "cid": "bafyreigtnj6ntulcilkmin4pgukjwv3nwglqpiiyddz3dyfexdbltze7sy", + "cid": testUtils.NewCidIndex(0, 0, "2", 0), "name": "name", }, },