Skip to content

Commit

Permalink
test: update conformance tests to commit 3264aa6a
Browse files Browse the repository at this point in the history
  • Loading branch information
dconeybe authored Jan 22, 2024
1 parent 62926d2 commit 2b839b1
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"tests": [
{
"description": "query: StartAfter with document snapshot",
"comment": "Cursor methods are allowed to use document snapshots with start_after. It should result in the document's data in the query.",
"query": {
"collPath": "projects/projectID/databases/(default)/documents/C",
"clauses": [
{
"orderBy": {
"path": {
"field": [
"a"
]
},
"direction": "asc"
}
},
{
"startAt": {
"jsonValues": [
"{\"a\": \"b\"}"
]
}
}
],
"query": {
"from": [
{
"collectionId": "C"
}
],
"orderBy": [
{
"field": {
"fieldPath": "a"
},
"direction": "ASCENDING"
}
],
"startAt": {
"values": [
{
"mapValue": {
"fields": {
"a": {
"stringValue": "b"
}
}
}
}
],
"before": true
}
}
}
}
]
}
4 changes: 2 additions & 2 deletions dev/conformance/conformance-tests/query-invalid-operator.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"tests": [
{
"description": "query: invalid operator in Where clause",
"comment": "The ! operator is not supported.",
"comment": "The |~| operator is not supported.",
"query": {
"collPath": "projects/projectID/databases/(default)/documents/C",
"clauses": [
Expand All @@ -13,7 +13,7 @@
"a"
]
},
"op": "!",
"op": "|~|",
"jsonValue": "4"
}
}
Expand Down
48 changes: 48 additions & 0 deletions dev/conformance/conformance-tests/set-arrayunion-merge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"tests": [
{
"description": "set: merge ArrayUnion field",
"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.",
"set": {
"option": {
"all": true
},
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayUnion\", \"foo\", \"bar\"]}}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"integerValue": "1"
}
}
},
"updateMask": {
"fieldPaths": ["a"]
},
"updateTransforms": [
{
"fieldPath": "b.c",
"appendMissingElements": {
"values": [
{
"stringValue": "foo"
},
{
"stringValue": "bar"
}
]
}
}
]
}
]
}
}
}
]
}

0 comments on commit 2b839b1

Please sign in to comment.