-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update conformance tests to match new repo / format. (#8689)
Update Makefile test proto builder: - Use new 'conformance_tests' repo. - Handle updated file hierarchy, etc. Use new JSON format in 'test_cross_language.py'. - Copy in JSON testcase files from 'conformance-tests' repo.
- Loading branch information
Showing
449 changed files
with
12,385 additions
and
9,168 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
2,208 changes: 2,208 additions & 0 deletions
2,208
firestore/google/cloud/firestore_v1/proto/tests_pb2.py
Large diffs are not rendered by default.
Oops, something went wrong.
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
73 changes: 73 additions & 0 deletions
73
firestore/tests/unit/v1/testdata/create-all-transforms.json
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,73 @@ | ||
{ | ||
"tests": [ | ||
{ | ||
"description": "create: all transforms in a single call", | ||
"comment": "A document can be created with any amount of transforms.", | ||
"create": { | ||
"docRefPath": "projects/projectID/databases/(default)/documents/C/d", | ||
"jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": [\"ArrayUnion\", 1, 2, 3], \"d\": [\"ArrayRemove\", 4, 5, 6]}", | ||
"request": { | ||
"database": "projects/projectID/databases/(default)", | ||
"writes": [ | ||
{ | ||
"update": { | ||
"name": "projects/projectID/databases/(default)/documents/C/d", | ||
"fields": { | ||
"a": { | ||
"integerValue": "1" | ||
} | ||
} | ||
}, | ||
"currentDocument": { | ||
"exists": false | ||
} | ||
}, | ||
{ | ||
"transform": { | ||
"document": "projects/projectID/databases/(default)/documents/C/d", | ||
"fieldTransforms": [ | ||
{ | ||
"fieldPath": "b", | ||
"setToServerValue": "REQUEST_TIME" | ||
}, | ||
{ | ||
"fieldPath": "c", | ||
"appendMissingElements": { | ||
"values": [ | ||
{ | ||
"integerValue": "1" | ||
}, | ||
{ | ||
"integerValue": "2" | ||
}, | ||
{ | ||
"integerValue": "3" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"fieldPath": "d", | ||
"removeAllFromArray": { | ||
"values": [ | ||
{ | ||
"integerValue": "4" | ||
}, | ||
{ | ||
"integerValue": "5" | ||
}, | ||
{ | ||
"integerValue": "6" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
64 changes: 0 additions & 64 deletions
64
firestore/tests/unit/v1/testdata/create-all-transforms.textproto
This file was deleted.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
firestore/tests/unit/v1/testdata/create-arrayremove-multi.json
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,69 @@ | ||
{ | ||
"tests": [ | ||
{ | ||
"description": "create: multiple ArrayRemove fields", | ||
"comment": "A document can have more than one ArrayRemove field.\nSince all the ArrayRemove fields are removed, the only field in the update is \"a\".", | ||
"create": { | ||
"docRefPath": "projects/projectID/databases/(default)/documents/C/d", | ||
"jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3], \"c\": {\"d\": [\"ArrayRemove\", 4, 5, 6]}}", | ||
"request": { | ||
"database": "projects/projectID/databases/(default)", | ||
"writes": [ | ||
{ | ||
"update": { | ||
"name": "projects/projectID/databases/(default)/documents/C/d", | ||
"fields": { | ||
"a": { | ||
"integerValue": "1" | ||
} | ||
} | ||
}, | ||
"currentDocument": { | ||
"exists": false | ||
} | ||
}, | ||
{ | ||
"transform": { | ||
"document": "projects/projectID/databases/(default)/documents/C/d", | ||
"fieldTransforms": [ | ||
{ | ||
"fieldPath": "b", | ||
"removeAllFromArray": { | ||
"values": [ | ||
{ | ||
"integerValue": "1" | ||
}, | ||
{ | ||
"integerValue": "2" | ||
}, | ||
{ | ||
"integerValue": "3" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"fieldPath": "c.d", | ||
"removeAllFromArray": { | ||
"values": [ | ||
{ | ||
"integerValue": "4" | ||
}, | ||
{ | ||
"integerValue": "5" | ||
}, | ||
{ | ||
"integerValue": "6" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
61 changes: 0 additions & 61 deletions
61
firestore/tests/unit/v1/testdata/create-arrayremove-multi.textproto
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.