-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab0da81
commit 66b2566
Showing
4 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
tests/integration/query/all_commits/with_dockey_cid_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2022 Democratized Data Foundation | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package all_commits | ||
|
||
import ( | ||
"testing" | ||
|
||
testUtils "github.com/sourcenetwork/defradb/tests/integration" | ||
) | ||
|
||
func TestQueryAllCommitsWithDockeyAndCid(t *testing.T) { | ||
test := testUtils.QueryTestCase{ | ||
Description: "Simple all commits query with dockey, order height desc", | ||
Query: `query { | ||
allCommits( | ||
dockey: "bae-52b9170d-b77a-5887-b877-cbdbb99b009f", | ||
cid: "bafybeibrbfg35mwggcj4vnskak4qn45hp7fy5a4zp2n34sbq5vt5utr6pq" | ||
) { | ||
cid | ||
} | ||
}`, | ||
Docs: map[int][]string{ | ||
0: { | ||
`{ | ||
"Name": "John", | ||
"Age": 21 | ||
}`, | ||
}, | ||
}, | ||
Updates: map[int]map[int][]string{ | ||
0: { | ||
0: { | ||
`{ | ||
"Age": 22 | ||
}`, | ||
}, | ||
}, | ||
}, | ||
Results: []map[string]any{ | ||
{ | ||
"cid": "bafybeibrbfg35mwggcj4vnskak4qn45hp7fy5a4zp2n34sbq5vt5utr6pq", | ||
}, | ||
}, | ||
} | ||
|
||
executeTestCase(t, test) | ||
} |