Skip to content

Commit

Permalink
update cids
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Apr 2, 2023
1 parent da7d94f commit 7dd4293
Show file tree
Hide file tree
Showing 18 changed files with 60 additions and 62 deletions.
6 changes: 3 additions & 3 deletions tests/integration/events/simple/with_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import (
testUtils "github.com/sourcenetwork/defradb/tests/integration/events"
)

// This test documents undesirable behaviour which should be corrected in
// https://github.com/sourcenetwork/defradb/issues/867
func TestEventsSimpleWithDelete(t *testing.T) {
doc1, err := client.NewDocFromJSON(
[]byte(
Expand Down Expand Up @@ -52,7 +50,9 @@ func TestEventsSimpleWithDelete(t *testing.T) {
{
DocKey: immutable.Some(docKey1),
},
// No update to reflect the delete
{
DocKey: immutable.Some(docKey1),
},
},
}

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/events/simple/with_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ func TestEventsSimpleWithUpdate(t *testing.T) {
ExpectedUpdates: []testUtils.ExpectedUpdate{
{
DocKey: immutable.Some(docKey1),
Cid: immutable.Some("bafybeiccuoxiq4ufhof2emicl76ixw2wln6tu2eytt6ckqzyqmkrosumwu"),
Cid: immutable.Some("bafybeiduhusqoizl5lmbszxkk42nqw4uxyvwxul45n2sszr6srwpdpmrdi"),
},
{
DocKey: immutable.Some(docKey2),
},
{
DocKey: immutable.Some(docKey1),
Cid: immutable.Some("bafybeifzbv7z54l6rvoqggjk73fwyjwo4n2utm4av7ek7kteyvezwhli6y"),
Cid: immutable.Some("bafybeife6ovwym6sr5aoz5w2eih6uhjva5ac7gsehkqx4z3bzlzuvp7cqy"),
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestMutationCreateSimpleReturnVersionCID(t *testing.T) {
{
"_version": []map[string]any{
{
"cid": "bafybeic5wsvyfs74vnqa3z5n3ozbsdt4h53di5ngnpt5qbeq6nywk3aiwi",
"cid": "bafybeih7js7lp4wz3ihp4jftld7kwcbsl6zbzuz4kerqaxudpssi6yunma",
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/query/commits/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestQueryCommits(t *testing.T) {
"cid": "bafybeih25dvtgei2bryhlz24tbyfdcni5di7akgcx24pezxts27wz7v454",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down Expand Up @@ -85,7 +85,7 @@ func TestQueryCommitsMultipleDocs(t *testing.T) {
"cid": "bafybeicb2o2enown46mt4rlzshoswuuxddf2anbc74eeydthrpyoloyziu",
},
{
"cid": "bafybeic52mkubp66yur3zsohpk4ccwpapx4snca5jvnrmlzhefpnn7x4am",
"cid": "bafybeif5qvt4lyqcszyoe6nm66j2zf6doszhnrcmzpq7tlk2wflfvrfhbu",
},
{
"cid": "bafybeihxvx3f7eejvco6zbxsidoeuph6ywpbo33lrqm3picna2aj7pdeiu",
Expand All @@ -94,7 +94,7 @@ func TestQueryCommitsMultipleDocs(t *testing.T) {
"cid": "bafybeih25dvtgei2bryhlz24tbyfdcni5di7akgcx24pezxts27wz7v454",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestQueryCommitsWithSchemaVersionIdField(t *testing.T) {
"schemaVersionId": "bafkreibwyhaiseplil6tayn7spazp3qmc7nkoxdjb7uoe5zvcac4pgbwhy",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"schemaVersionId": "bafkreibwyhaiseplil6tayn7spazp3qmc7nkoxdjb7uoe5zvcac4pgbwhy",
},
},
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/query/commits/with_depth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestQueryCommitsWithDepth1(t *testing.T) {
"cid": "bafybeih25dvtgei2bryhlz24tbyfdcni5di7akgcx24pezxts27wz7v454",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down Expand Up @@ -90,7 +90,7 @@ func TestQueryCommitsWithDepth1WithUpdate(t *testing.T) {
"height": int64(1),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
},
Expand Down Expand Up @@ -152,12 +152,12 @@ func TestQueryCommitsWithDepth2WithUpdate(t *testing.T) {
},
{
// "Age" field head
"cid": "bafybeihjmxcpf7ab7uzktqs7d7mt5hytrkchzsqz4j2ab3gwhqlpulbfsu",
"cid": "bafybeid2arccjpsmmocarl6s3fe7ygstbdlpujlksuflukmun4bvf5g4oe",
"height": int64(3),
},
{
// "Age" field head -1
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
},
Expand Down Expand Up @@ -201,7 +201,7 @@ func TestQueryCommitsWithDepth1AndMultipleDocs(t *testing.T) {
"cid": "bafybeih25dvtgei2bryhlz24tbyfdcni5di7akgcx24pezxts27wz7v454",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
{
"cid": "bafybeifo3ujh2imjbx7d4g43eocureejdcclb2zpkzelwtt2omaxzxkxlm",
Expand All @@ -210,7 +210,7 @@ func TestQueryCommitsWithDepth1AndMultipleDocs(t *testing.T) {
"cid": "bafybeih2tjbbltowuprpc7q7tx7jw7zwlso5s3yck3o5gmi3dsr54ooyey",
},
{
"cid": "bafybeih2fsuzskmm6vlk2t274hw2mzitye6bbc4sozppokhhy4piphn6qq",
"cid": "bafybeicy3ugjnpvsr6w74lh5se4dzvfncshtz6n54uw2gjzbk42hmojigq",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/query/commits/with_dockey_count_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestQueryCommitsWithDockeyAndLinkCount(t *testing.T) {
"_count": 0,
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"_count": 2,
},
},
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/query/commits/with_dockey_field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func TestQueryCommitsWithDockeyAndCompositeFieldId(t *testing.T) {
}`,
Results: []map[string]any{
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestQueryCommitsWithDockeyAndOrderAndLimitAndOffset(t *testing.T) {
}`,
Results: []map[string]any{
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
{
Expand Down
28 changes: 14 additions & 14 deletions tests/integration/query/commits/with_dockey_order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestQueryCommitsWithDockeyAndOrderHeightDesc(t *testing.T) {
"height": int64(2),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
{
Expand All @@ -60,7 +60,7 @@ func TestQueryCommitsWithDockeyAndOrderHeightDesc(t *testing.T) {
"height": int64(1),
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"height": int64(1),
},
},
Expand Down Expand Up @@ -107,15 +107,15 @@ func TestQueryCommitsWithDockeyAndOrderHeightAsc(t *testing.T) {
"height": int64(1),
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"height": int64(1),
},
{
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"height": int64(2),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
},
Expand Down Expand Up @@ -162,15 +162,15 @@ func TestQueryCommitsWithDockeyAndOrderCidDesc(t *testing.T) {
"height": int64(1),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"height": int64(2),
},
{
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"height": int64(1),
},
},
Expand Down Expand Up @@ -209,15 +209,15 @@ func TestQueryCommitsWithDockeyAndOrderCidAsc(t *testing.T) {
}`,
Results: []map[string]any{
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"height": int64(1),
},
{
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"height": int64(2),
},
{
Expand Down Expand Up @@ -286,31 +286,31 @@ func TestQueryCommitsWithDockeyAndOrderAndMultiUpdatesCidAsc(t *testing.T) {
"height": int64(1),
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"height": int64(1),
},
{
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"height": int64(2),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
{
"cid": "bafybeidag5ogxiqsctdxktobw6gbq52pbfkmicp6np5ccuy6pjyvgobdxq",
"height": int64(3),
},
{
"cid": "bafybeihjmxcpf7ab7uzktqs7d7mt5hytrkchzsqz4j2ab3gwhqlpulbfsu",
"cid": "bafybeid2arccjpsmmocarl6s3fe7ygstbdlpujlksuflukmun4bvf5g4oe",
"height": int64(3),
},
{
"cid": "bafybeiadnlnuu3gkfaf5fgib3iqfsntitb4pjrc5hffvmhpdjqgsxutc5q",
"height": int64(4),
},
{
"cid": "bafybeicnmkwcoopkwy2cah3jyxmxjvsp65sl2e6d5mqb5ygfdyjvfbydhi",
"cid": "bafybeifyiqii323sy5xvqkltdaj5wb4p2zsotepcmv6zqxfr73lky24qw4",
"height": int64(4),
},
},
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/query/commits/with_dockey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestQueryCommitsWithDockey(t *testing.T) {
"cid": "bafybeih25dvtgei2bryhlz24tbyfdcni5di7akgcx24pezxts27wz7v454",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down Expand Up @@ -110,7 +110,7 @@ func TestQueryCommitsWithDockeyAndLinks(t *testing.T) {
"links": []map[string]any{},
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"links": []map[string]any{
{
"cid": "bafybeihxvx3f7eejvco6zbxsidoeuph6ywpbo33lrqm3picna2aj7pdeiu",
Expand Down Expand Up @@ -170,11 +170,11 @@ func TestQueryCommitsWithDockeyAndUpdate(t *testing.T) {
"height": int64(1),
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"height": int64(2),
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"height": int64(1),
},
},
Expand Down Expand Up @@ -236,20 +236,20 @@ func TestQueryCommitsWithDockeyAndUpdateAndLinks(t *testing.T) {
"links": []map[string]any{},
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
"links": []map[string]any{
{
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
"name": "Age",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"name": "_head",
},
},
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"links": []map[string]any{
{
"cid": "bafybeihxvx3f7eejvco6zbxsidoeuph6ywpbo33lrqm3picna2aj7pdeiu",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestQueryCommitsWithDockeyWithTypeName(t *testing.T) {
"__typename": "Commit",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"__typename": "Commit",
},
},
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/query/commits/with_field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestQueryCommitsWithCompositeFieldId(t *testing.T) {
}`,
Results: []map[string]any{
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestQueryCommitsWithCompositeFieldIdWithReturnedSchemaVersionId(t *testing.
}`,
Results: []map[string]any{
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"schemaVersionId": "bafkreibwyhaiseplil6tayn7spazp3qmc7nkoxdjb7uoe5zvcac4pgbwhy",
},
},
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/query/commits/with_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestQueryCommitsWithGroupByHeightWithChild(t *testing.T) {
"cid": "bafybeiepww5b67jrrliuiy27erfjuivwnjca5ptdpbxrrjrqkh3b2hckyy",
},
{
"cid": "bafybeigk3hiskvcflfgk5cuivr7dnwhwsjlh3vyfkqxyvkpnz72kf5zn7i",
"cid": "bafybeiebail45ch3n5rh7myumqn2jfeefnynba2ldwiesge3ddq5hu6olq",
},
},
},
Expand All @@ -106,7 +106,7 @@ func TestQueryCommitsWithGroupByHeightWithChild(t *testing.T) {
"cid": "bafybeih25dvtgei2bryhlz24tbyfdcni5di7akgcx24pezxts27wz7v454",
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
},
},
},
Expand Down Expand Up @@ -158,7 +158,7 @@ func TestQueryCommitsWithGroupByCidWithChild(t *testing.T) {
},
},
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"_group": []map[string]any{
{
"height": int64(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TestQueryLatestCommitsWithDocKeyAndCompositeFieldId(t *testing.T) {
},
Results: []map[string]any{
{
"cid": "bafybeicjgxd46coc73ybx7cvdxk5c6pdbp5nbick4drrlbevgg7a7mhkzy",
"cid": "bafybeiapquwo7dfow7b7ovwrn3nl4e2cv2g5eoufuzylq54b4o6tatfrny",
"links": []map[string]any{
{
"cid": "bafybeihxvx3f7eejvco6zbxsidoeuph6ywpbo33lrqm3picna2aj7pdeiu",
Expand Down
Loading

0 comments on commit 7dd4293

Please sign in to comment.