Skip to content

Commit 2b839b1

Browse files
authored
test: update conformance tests to commit 3264aa6a
1 parent 62926d2 commit 2b839b1

File tree

3 files changed

+109
-2
lines changed

3 files changed

+109
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"tests": [
3+
{
4+
"description": "query: StartAfter with document snapshot",
5+
"comment": "Cursor methods are allowed to use document snapshots with start_after. It should result in the document's data in the query.",
6+
"query": {
7+
"collPath": "projects/projectID/databases/(default)/documents/C",
8+
"clauses": [
9+
{
10+
"orderBy": {
11+
"path": {
12+
"field": [
13+
"a"
14+
]
15+
},
16+
"direction": "asc"
17+
}
18+
},
19+
{
20+
"startAt": {
21+
"jsonValues": [
22+
"{\"a\": \"b\"}"
23+
]
24+
}
25+
}
26+
],
27+
"query": {
28+
"from": [
29+
{
30+
"collectionId": "C"
31+
}
32+
],
33+
"orderBy": [
34+
{
35+
"field": {
36+
"fieldPath": "a"
37+
},
38+
"direction": "ASCENDING"
39+
}
40+
],
41+
"startAt": {
42+
"values": [
43+
{
44+
"mapValue": {
45+
"fields": {
46+
"a": {
47+
"stringValue": "b"
48+
}
49+
}
50+
}
51+
}
52+
],
53+
"before": true
54+
}
55+
}
56+
}
57+
}
58+
]
59+
}

dev/conformance/conformance-tests/query-invalid-operator.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"tests": [
33
{
44
"description": "query: invalid operator in Where clause",
5-
"comment": "The ! operator is not supported.",
5+
"comment": "The |~| operator is not supported.",
66
"query": {
77
"collPath": "projects/projectID/databases/(default)/documents/C",
88
"clauses": [
@@ -13,7 +13,7 @@
1313
"a"
1414
]
1515
},
16-
"op": "!",
16+
"op": "|~|",
1717
"jsonValue": "4"
1818
}
1919
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"tests": [
3+
{
4+
"description": "set: merge ArrayUnion field",
5+
"comment": "An ArrayUnion value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". \"a\" is left alone and remains in the object.",
6+
"set": {
7+
"option": {
8+
"all": true
9+
},
10+
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
11+
"jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayUnion\", \"foo\", \"bar\"]}}",
12+
"request": {
13+
"database": "projects/projectID/databases/(default)",
14+
"writes": [
15+
{
16+
"update": {
17+
"name": "projects/projectID/databases/(default)/documents/C/d",
18+
"fields": {
19+
"a": {
20+
"integerValue": "1"
21+
}
22+
}
23+
},
24+
"updateMask": {
25+
"fieldPaths": ["a"]
26+
},
27+
"updateTransforms": [
28+
{
29+
"fieldPath": "b.c",
30+
"appendMissingElements": {
31+
"values": [
32+
{
33+
"stringValue": "foo"
34+
},
35+
{
36+
"stringValue": "bar"
37+
}
38+
]
39+
}
40+
}
41+
]
42+
}
43+
]
44+
}
45+
}
46+
}
47+
]
48+
}

0 commit comments

Comments
 (0)