diff --git a/firestore/v1/update-exists-false-precond.json b/firestore/v1/update-exists-false-precond.json new file mode 100644 index 0000000..031fd1a --- /dev/null +++ b/firestore/v1/update-exists-false-precond.json @@ -0,0 +1,16 @@ +{ + "tests": [ + { + "description": "update: Exists=false precondition is invalid", + "comment": "The Update method does not support an explicit exists=false precondition.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "exists": false + }, + "jsonData": "{\"a\": 1}", + "isError": true + } + } + ] +} diff --git a/firestore/v1/update-exists-precond.json b/firestore/v1/update-exists-true-precond.json similarity index 84% rename from firestore/v1/update-exists-precond.json rename to firestore/v1/update-exists-true-precond.json index 66e5d11..f1aa800 100644 --- a/firestore/v1/update-exists-precond.json +++ b/firestore/v1/update-exists-true-precond.json @@ -1,8 +1,8 @@ { "tests": [ { - "description": "update: Exists precondition is valid", - "comment": "The Update method supports an explicit exists precondition.", + "description": "update: Exists=true precondition is valid", + "comment": "The Update method supports an explicit exists=true precondition.", "update": { "docRefPath": "projects/projectID/databases/(default)/documents/C/d", "precondition": { diff --git a/firestore/v1/update-paths-exists-false-precond.json b/firestore/v1/update-paths-exists-false-precond.json new file mode 100644 index 0000000..f122b53 --- /dev/null +++ b/firestore/v1/update-paths-exists-false-precond.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "update-paths: Exists=false precondition is invalid", + "comment": "The Update method does not support an explicit exists=false precondition.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "exists": false + }, + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "1" + ], + "isError": true + } + } + ] +} diff --git a/firestore/v1/update-paths-exists-precond.json b/firestore/v1/update-paths-exists-true-precond.json similarity index 86% rename from firestore/v1/update-paths-exists-precond.json rename to firestore/v1/update-paths-exists-true-precond.json index 6325c75..39d61c9 100644 --- a/firestore/v1/update-paths-exists-precond.json +++ b/firestore/v1/update-paths-exists-true-precond.json @@ -1,8 +1,8 @@ { "tests": [ { - "description": "update-paths: Exists precondition is valid", - "comment": "The Update method supports an explicit exists precondition.", + "description": "update-paths: Exists=true precondition is valid", + "comment": "The Update method supports an explicit exists=true precondition.", "updatePaths": { "docRefPath": "projects/projectID/databases/(default)/documents/C/d", "precondition": {