Update dependencies

Among others, this updates minio-go, so that the new "eu-west-3" zone
for AWS is supported.
This commit is contained in:
Alexander Neumann
2018-01-23 19:40:42 +01:00
parent b63de7c798
commit 2b39f9f4b2
3435 changed files with 1317989 additions and 315639 deletions
+11
View File
@@ -0,0 +1,11 @@
# Copy textproto files in this directory from the source of truth.
SRC=$(GOPATH)/src/github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/testdata
.PHONY: refresh
refresh:
-rm *.textproto
cp $(SRC)/*.textproto .
openssl dgst -sha1 $(SRC)/tests.binprotos > VERSION
+1
View File
@@ -0,0 +1 @@
SHA1(/usr/local/google/home/jba/go/src/github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/testdata/tests.binprotos)= b0fbaaac8664945cb4f5667da092a6f9ededc57e
+27
View File
@@ -0,0 +1,27 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A simple call, resulting in a single update operation.
description: "create: basic"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
current_document: <
exists: false
>
>
>
>
+61
View File
@@ -0,0 +1,61 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A call to a write method with complicated input data.
description: "create: complex"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
array_value: <
values: <
integer_value: 1
>
values: <
double_value: 2.5
>
>
>
>
fields: <
key: "b"
value: <
map_value: <
fields: <
key: "c"
value: <
array_value: <
values: <
string_value: "three"
>
values: <
map_value: <
fields: <
key: "d"
value: <
boolean_value: true
>
>
>
>
>
>
>
>
>
>
>
current_document: <
exists: false
>
>
>
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "create: Delete cannot be anywhere inside an array value"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, {\"b\": \"Delete\"}]}"
is_error: true
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "create: Delete cannot be in an array value"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2, \"Delete\"]}"
is_error: true
>
+20
View File
@@ -0,0 +1,20 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
description: "create: creating or setting an empty map"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
current_document: <
exists: false
>
>
>
>
+11
View File
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel cannot be used in Create, or in Set without a Merge option.
description: "create: Delete cannot appear in data"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
is_error: true
>
+40
View File
@@ -0,0 +1,40 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Create and Set treat their map keys literally. They do not split on dots.
description: "create: don\342\200\231t split on dots"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{ \"a.b\": { \"c.d\": 1 }, \"e\": 2 }"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a.b"
value: <
map_value: <
fields: <
key: "c.d"
value: <
integer_value: 1
>
>
>
>
>
fields: <
key: "e"
value: <
integer_value: 2
>
>
>
current_document: <
exists: false
>
>
>
>
@@ -0,0 +1,41 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Create and Set treat their map keys literally. They do not escape special
# characters.
description: "create: non-alpha characters in map keys"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{ \"*\": { \".\": 1 }, \"~\": 2 }"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "*"
value: <
map_value: <
fields: <
key: "."
value: <
integer_value: 1
>
>
>
>
>
fields: <
key: "~"
value: <
integer_value: 2
>
>
>
current_document: <
exists: false
>
>
>
>
@@ -0,0 +1,26 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the only values in the input are ServerTimestamps, then no update operation
# should be produced.
description: "create: ServerTimestamp alone"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "a"
set_to_server_value: REQUEST_TIME
>
>
current_document: <
exists: false
>
>
>
>
@@ -0,0 +1,41 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A document can have more than one ServerTimestamp field. Since all the
# ServerTimestamp fields are removed, the only field in the update is "a".
description: "create: multiple ServerTimestamp fields"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
current_document: <
exists: false
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
field_transforms: <
field_path: "c.d"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,38 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A ServerTimestamp value can occur at any depth. In this case, the transform
# applies to the field path "b.c". Since "c" is removed from the update, "b"
# becomes empty, so it is also removed from the update.
description: "create: nested ServerTimestamp field"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
current_document: <
exists: false
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b.c"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# There cannot be an array value anywhere on the path from the document root to
# the ServerTimestamp sentinel. Firestore transforms don't support array indexing.
description: "create: ServerTimestamp cannot be anywhere inside an array value"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}"
is_error: true
>
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The ServerTimestamp sentinel must be the value of a field. Firestore transforms
# don't support array indexing.
description: "create: ServerTimestamp cannot be in an array value"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2, \"ServerTimestamp\"]}"
is_error: true
>
+39
View File
@@ -0,0 +1,39 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A key with the special ServerTimestamp sentinel is removed from the data in the
# update operation. Instead it appears in a separate Transform operation. Note
# that in these tests, the string "ServerTimestamp" should be replaced with the
# special ServerTimestamp value.
description: "create: ServerTimestamp with data"
create: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
current_document: <
exists: false
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,21 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Delete supports an exists precondition.
description: "delete: delete with exists precondition"
delete: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
precondition: <
exists: true
>
request: <
database: "projects/projectID/databases/(default)"
writes: <
delete: "projects/projectID/databases/(default)/documents/C/d"
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,15 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# An ordinary Delete call.
description: "delete: delete without precondition"
delete: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
request: <
database: "projects/projectID/databases/(default)"
writes: <
delete: "projects/projectID/databases/(default)/documents/C/d"
>
>
>
@@ -0,0 +1,25 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Delete supports a last-update-time precondition.
description: "delete: delete with last-update-time precondition"
delete: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
precondition: <
update_time: <
seconds: 42
>
>
request: <
database: "projects/projectID/databases/(default)"
writes: <
delete: "projects/projectID/databases/(default)/documents/C/d"
current_document: <
update_time: <
seconds: 42
>
>
>
>
>
-23
View File
@@ -1,23 +0,0 @@
{
"comment": "Field path test suite. Backslash must be escaped in JSON strings.",
"good": [
["a", "a"],
["__x__", "__x__"],
["aBc0_d1", "aBc0_d1"],
["a.b", "a", "b"],
["`a`", "a"],
["`a`.b", "a", "b"],
["`a`.`b`.c", "a", "b", "c"],
["`a.b`.c", "a.b", "c"],
["`..`.`...`", "..", "..."],
["` `", " "],
["`\t\t`.` x\t`", "\t\t", " x\t"],
["`\b\f\r`", "\b\f\r"],
["`a\\`b`.`c\\\\d`", "a`b", "c\\d"],
["`\\\\`.`\\`\\``", "\\", "``"]
],
"bad": ["", " ", "\t", "a.", ".a", "a.b.", "a..b",
"`", "``", "`a", "a`", "a`b", "`a`b", "a`b`", "`a`.b`c`",
"\\", "\\`"]
}
+12
View File
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A call to DocumentRef.Get.
description: "get: get a document"
get: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
request: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
>
+24
View File
@@ -0,0 +1,24 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A simple call, resulting in a single update operation.
description: "set: basic"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
>
>
>
+58
View File
@@ -0,0 +1,58 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A call to a write method with complicated input data.
description: "set: complex"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
array_value: <
values: <
integer_value: 1
>
values: <
double_value: 2.5
>
>
>
>
fields: <
key: "b"
value: <
map_value: <
fields: <
key: "c"
value: <
array_value: <
values: <
string_value: "three"
>
values: <
map_value: <
fields: <
key: "d"
value: <
boolean_value: true
>
>
>
>
>
>
>
>
>
>
>
>
>
>
@@ -0,0 +1,28 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A Delete sentinel can appear with a merge option. If the delete paths are the
# only ones to be merged, then no document is sent, just an update mask.
description: "set-merge: Delete with merge"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "b"
field: "c"
>
>
json_data: "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
update_mask: <
field_paths: "b.c"
>
>
>
>
+37
View File
@@ -0,0 +1,37 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A Delete sentinel can appear with a merge option.
description: "set-merge: Delete with merge"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "a"
>
fields: <
field: "b"
field: "c"
>
>
json_data: "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b.c"
>
>
>
>
@@ -0,0 +1,31 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A Delete sentinel can appear with a mergeAll option.
description: "set: Delete with MergeAll"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b.c"
>
>
>
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "set: Delete cannot be anywhere inside an array value"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, {\"b\": \"Delete\"}]}"
is_error: true
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "set: Delete cannot be in an array value"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2, \"Delete\"]}"
is_error: true
>
@@ -0,0 +1,17 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The client signals an error if the Delete sentinel is in the input data, but not
# selected by a merge option, because this is most likely a programming bug.
description: "set-merge: Delete cannot appear in an unmerged field"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "a"
>
>
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
is_error: true
>
@@ -0,0 +1,19 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If a Delete is part of the value at a merge path, then the user is confused:
# their merge path says "replace this entire value" but their Delete says "delete
# this part of the value". This should be an error, just as if they specified
# Delete in a Set with no merge.
description: "set-merge: Delete cannot appear as part of a merge path"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "h"
>
>
json_data: "{\"h\": {\"g\": \"Delete\"}}"
is_error: true
>
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Without a merge option, Set replaces the document with the input data. A Delete
# sentinel in the data makes no sense in this case.
description: "set: Delete cannot appear unless a merge option is specified"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
is_error: true
>
+17
View File
@@ -0,0 +1,17 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
description: "set: creating or setting an empty map"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
>
>
>
+40
View File
@@ -0,0 +1,40 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A merge with fields that use special characters.
description: "set-merge: Merge with FieldPaths"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "*"
field: "~"
>
>
json_data: "{\"*\": {\"~\": true}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "*"
value: <
map_value: <
fields: <
key: "~"
value: <
boolean_value: true
>
>
>
>
>
>
update_mask: <
field_paths: "`*`.`~`"
>
>
>
>
@@ -0,0 +1,41 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A merge option where the field is not at top level. Only fields mentioned in the
# option are present in the update operation.
description: "set-merge: Merge with a nested field"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "h"
field: "g"
>
>
json_data: "{\"h\": {\"g\": 4, \"f\": 5}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "h"
value: <
map_value: <
fields: <
key: "g"
value: <
integer_value: 4
>
>
>
>
>
>
update_mask: <
field_paths: "h.g"
>
>
>
>
@@ -0,0 +1,46 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If a field path is in a merge option, the value at that path replaces the stored
# value. That is true even if the value is complex.
description: "set-merge: Merge field is not a leaf"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "h"
>
>
json_data: "{\"h\": {\"f\": 5, \"g\": 6}, \"e\": 7}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "h"
value: <
map_value: <
fields: <
key: "f"
value: <
integer_value: 5
>
>
fields: <
key: "g"
value: <
integer_value: 6
>
>
>
>
>
>
update_mask: <
field_paths: "h"
>
>
>
>
@@ -0,0 +1,21 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The prefix would make the other path meaningless, so this is probably a
# programming error.
description: "set-merge: One merge path cannot be the prefix of another"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "a"
>
fields: <
field: "a"
field: "b"
>
>
json_data: "{\"a\": {\"b\": 1}}"
is_error: true
>
@@ -0,0 +1,20 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The client signals an error if a merge option mentions a path that is not in the
# input data.
description: "set-merge: Merge fields must all be present in data"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "b"
>
fields: <
field: "a"
>
>
json_data: "{\"a\": 1}"
is_error: true
>
+32
View File
@@ -0,0 +1,32 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Fields in the input data but not in a merge option are pruned.
description: "set-merge: Merge with a field"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "a"
>
>
json_data: "{\"a\": 1, \"b\": 2}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
>
>
>
@@ -0,0 +1,15 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# It makes no sense to specify MergeAll and provide no data, so we disallow it on
# the client.
description: "set: MergeAll cannot be specified with empty data."
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{}"
is_error: true
>
@@ -0,0 +1,45 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# MergeAll with nested fields results in an update mask that includes entries for
# all the leaf fields.
description: "set: MergeAll with nested fields"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{\"h\": { \"g\": 3, \"f\": 4 }}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "h"
value: <
map_value: <
fields: <
key: "f"
value: <
integer_value: 4
>
>
fields: <
key: "g"
value: <
integer_value: 3
>
>
>
>
>
>
update_mask: <
field_paths: "h.f"
field_paths: "h.g"
>
>
>
>
+37
View File
@@ -0,0 +1,37 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The MergeAll option with a simple piece of data.
description: "set: MergeAll"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{\"a\": 1, \"b\": 2}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
fields: <
key: "b"
value: <
integer_value: 2
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b"
>
>
>
>
+11
View File
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel cannot be used in Create, or in Set without a Merge option.
description: "set: Delete cannot appear in data"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
is_error: true
>
+37
View File
@@ -0,0 +1,37 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Create and Set treat their map keys literally. They do not split on dots.
description: "set: don\342\200\231t split on dots"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{ \"a.b\": { \"c.d\": 1 }, \"e\": 2 }"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a.b"
value: <
map_value: <
fields: <
key: "c.d"
value: <
integer_value: 1
>
>
>
>
>
fields: <
key: "e"
value: <
integer_value: 2
>
>
>
>
>
>
@@ -0,0 +1,38 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Create and Set treat their map keys literally. They do not escape special
# characters.
description: "set: non-alpha characters in map keys"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{ \"*\": { \".\": 1 }, \"~\": 2 }"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "*"
value: <
map_value: <
fields: <
key: "."
value: <
integer_value: 1
>
>
>
>
>
fields: <
key: "~"
value: <
integer_value: 2
>
>
>
>
>
>
@@ -0,0 +1,26 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the only values in the input are ServerTimestamps, then no update operation
# should be produced.
description: "set: ServerTimestamp alone with MergeAll"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{\"a\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "a"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
+28
View File
@@ -0,0 +1,28 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the only values in the input are ServerTimestamps, then an update operation
# with an empty map should be produced.
description: "set: ServerTimestamp alone"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "a"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,45 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Just as when no merge option is specified, ServerTimestamp sentinel values are
# removed from the data in the update operation and become transforms.
description: "set-merge: ServerTimestamp with Merge of both fields"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "a"
>
fields: <
field: "b"
>
>
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,37 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If a field path is in a merge option, the value at that path replaces the stored
# value. If the value has only ServerTimestamps, they become transforms and we
# clear the value by including the field path in the update mask.
description: "set-merge: non-leaf merge field with ServerTimestamp alone"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "h"
>
>
json_data: "{\"h\": {\"g\": \"ServerTimestamp\"}, \"e\": 7}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
update_mask: <
field_paths: "h"
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "h.g"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,49 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If a field path is in a merge option, the value at that path replaces the stored
# value, and ServerTimestamps inside that value become transforms as usual.
description: "set-merge: non-leaf merge field with ServerTimestamp"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "h"
>
>
json_data: "{\"h\": {\"f\": 5, \"g\": \"ServerTimestamp\"}, \"e\": 7}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "h"
value: <
map_value: <
fields: <
key: "f"
value: <
integer_value: 5
>
>
>
>
>
>
update_mask: <
field_paths: "h"
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "h.g"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,28 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If all the fields in the merge option have ServerTimestamp values, then no
# update operation is produced, only a transform.
description: "set-merge: If no ordinary values in Merge, no write"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "b"
>
>
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,40 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Just as when no merge option is specified, ServerTimestamp sentinel values are
# removed from the data in the update operation and become transforms.
description: "set: ServerTimestamp with MergeAll"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
all: true
>
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
+38
View File
@@ -0,0 +1,38 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A document can have more than one ServerTimestamp field. Since all the
# ServerTimestamp fields are removed, the only field in the update is "a".
description: "set: multiple ServerTimestamp fields"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
field_transforms: <
field_path: "c.d"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
+35
View File
@@ -0,0 +1,35 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A ServerTimestamp value can occur at any depth. In this case, the transform
# applies to the field path "b.c". Since "c" is removed from the update, "b"
# becomes empty, so it is also removed from the update.
description: "set: nested ServerTimestamp field"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b.c"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# There cannot be an array value anywhere on the path from the document root to
# the ServerTimestamp sentinel. Firestore transforms don't support array indexing.
description: "set: ServerTimestamp cannot be anywhere inside an array value"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}"
is_error: true
>
+12
View File
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The ServerTimestamp sentinel must be the value of a field. Firestore transforms
# don't support array indexing.
description: "set: ServerTimestamp cannot be in an array value"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2, \"ServerTimestamp\"]}"
is_error: true
>
+33
View File
@@ -0,0 +1,33 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the ServerTimestamp value is not mentioned in a merge option, then it is
# pruned from the data but does not result in a transform.
description: "set-merge: If is ServerTimestamp not in Merge, no transform"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
option: <
fields: <
field: "a"
>
>
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
>
>
>
+36
View File
@@ -0,0 +1,36 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A key with the special ServerTimestamp sentinel is removed from the data in the
# update operation. Instead it appears in a separate Transform operation. Note
# that in these tests, the string "ServerTimestamp" should be replaced with the
# special ServerTimestamp value.
description: "set: ServerTimestamp with data"
set: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
+12
View File
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The keys of the data given to Update are interpreted, unlike those of Create and
# Set. They cannot contain special characters.
description: "update: invalid character"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a~b\": 1}"
is_error: true
>
+30
View File
@@ -0,0 +1,30 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A simple call, resulting in a single update operation.
description: "update: basic"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
current_document: <
exists: true
>
>
>
>
+65
View File
@@ -0,0 +1,65 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A call to a write method with complicated input data.
description: "update: complex"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
array_value: <
values: <
integer_value: 1
>
values: <
double_value: 2.5
>
>
>
>
fields: <
key: "b"
value: <
map_value: <
fields: <
key: "c"
value: <
array_value: <
values: <
string_value: "three"
>
values: <
map_value: <
fields: <
key: "d"
value: <
boolean_value: true
>
>
>
>
>
>
>
>
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,25 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the input data consists solely of Deletes, then the update operation has no
# map, just an update mask.
description: "update: Delete alone"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": \"Delete\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
update_mask: <
field_paths: "a"
>
current_document: <
exists: true
>
>
>
>
+46
View File
@@ -0,0 +1,46 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# After expanding top-level dotted fields, fields with Delete values are pruned
# from the output data, but appear in the update mask.
description: "update: Delete with a dotted field"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b.c\": \"Delete\", \"b.d\": 2}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
fields: <
key: "b"
value: <
map_value: <
fields: <
key: "d"
value: <
integer_value: 2
>
>
>
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b.c"
field_paths: "b.d"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a top-level key.
description: "update: Delete cannot be nested"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": {\"b\": \"Delete\"}}"
is_error: true
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "update: Delete cannot be anywhere inside an array value"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, {\"b\": \"Delete\"}]}"
is_error: true
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "update: Delete cannot be in an array value"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": [1, 2, \"Delete\"]}"
is_error: true
>
+32
View File
@@ -0,0 +1,32 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If a field's value is the Delete sentinel, then it doesn't appear in the update
# data, but does in the mask.
description: "update: Delete"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"b\": \"Delete\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,14 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Update method does not support an explicit exists precondition.
description: "update: Exists precondition is invalid"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
precondition: <
exists: true
>
json_data: "{\"a\": 1}"
is_error: true
>
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Empty fields are not allowed.
description: "update: empty field path component"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a..b\": 1}"
is_error: true
>
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# It is a client-side error to call Update with empty data.
description: "update: no paths"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{}"
is_error: true
>
@@ -0,0 +1,33 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A simple call, resulting in a single update operation.
description: "update-paths: basic"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "1"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,72 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A call to a write method with complicated input data.
description: "update-paths: complex"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "b"
>
json_values: "[1, 2.5]"
json_values: "{\"c\": [\"three\", {\"d\": true}]}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
array_value: <
values: <
integer_value: 1
>
values: <
double_value: 2.5
>
>
>
>
fields: <
key: "b"
value: <
map_value: <
fields: <
key: "c"
value: <
array_value: <
values: <
string_value: "three"
>
values: <
map_value: <
fields: <
key: "d"
value: <
boolean_value: true
>
>
>
>
>
>
>
>
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,28 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the input data consists solely of Deletes, then the update operation has no
# map, just an update mask.
description: "update-paths: Delete alone"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "\"Delete\""
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
>
update_mask: <
field_paths: "a"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,14 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a top-level key.
description: "update-paths: Delete cannot be nested"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "{\"b\": \"Delete\"}"
is_error: true
>
@@ -0,0 +1,16 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "update-paths: Delete cannot be anywhere inside an array value"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "[1, {\"b\": \"Delete\"}]"
is_error: true
>
@@ -0,0 +1,16 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Delete sentinel must be the value of a field. Deletes are implemented by
# turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not
# support array indexing.
description: "update-paths: Delete cannot be in an array value"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "[1, 2, \"Delete\"]"
is_error: true
>
@@ -0,0 +1,39 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If a field's value is the Delete sentinel, then it doesn't appear in the update
# data, but does in the mask.
description: "update-paths: Delete"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "b"
>
json_values: "1"
json_values: "\"Delete\""
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,17 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Update method does not support an explicit exists precondition.
description: "update-paths: Exists precondition is invalid"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
precondition: <
exists: true
>
field_paths: <
field: "a"
>
json_values: "1"
is_error: true
>
@@ -0,0 +1,22 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The same field cannot occur more than once.
description: "update-paths: duplicate field path"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "b"
>
field_paths: <
field: "a"
>
json_values: "1"
json_values: "2"
json_values: "3"
is_error: true
>
@@ -0,0 +1,15 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# Empty fields are not allowed.
description: "update-paths: empty field path component"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "*"
field: ""
>
json_values: "1"
is_error: true
>
@@ -0,0 +1,13 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A FieldPath of length zero is invalid.
description: "update-paths: empty field path"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
>
json_values: "1"
is_error: true
>
@@ -0,0 +1,42 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The UpdatePaths or equivalent method takes a list of FieldPaths. Each FieldPath
# is a sequence of uninterpreted path components.
description: "update-paths: multiple-element field path"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
field: "b"
>
json_values: "1"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
map_value: <
fields: <
key: "b"
value: <
integer_value: 1
>
>
>
>
>
>
update_mask: <
field_paths: "a.b"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,48 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# FieldPath components are not split on dots.
description: "update-paths: FieldPath elements are not split on dots"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a.b"
field: "f.g"
>
json_values: "{\"n.o\": 7}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a.b"
value: <
map_value: <
fields: <
key: "f.g"
value: <
map_value: <
fields: <
key: "n.o"
value: <
integer_value: 7
>
>
>
>
>
>
>
>
>
update_mask: <
field_paths: "`a.b`.`f.g`"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,10 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# It is a client-side error to call Update with empty data.
description: "update-paths: no paths"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
is_error: true
>
@@ -0,0 +1,19 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In the input data, one field cannot be a prefix of another.
description: "update-paths: prefix #1"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
field: "b"
>
field_paths: <
field: "a"
>
json_values: "1"
json_values: "2"
is_error: true
>
@@ -0,0 +1,19 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In the input data, one field cannot be a prefix of another.
description: "update-paths: prefix #2"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "a"
field: "b"
>
json_values: "1"
json_values: "2"
is_error: true
>
@@ -0,0 +1,20 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In the input data, one field cannot be a prefix of another, even if the values
# could in principle be combined.
description: "update-paths: prefix #3"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "a"
field: "d"
>
json_values: "{\"b\": 1}"
json_values: "2"
is_error: true
>
@@ -0,0 +1,53 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# FieldPaths can contain special characters.
description: "update-paths: special characters"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "*"
field: "~"
>
field_paths: <
field: "*"
field: "`"
>
json_values: "1"
json_values: "2"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "*"
value: <
map_value: <
fields: <
key: "`"
value: <
integer_value: 2
>
>
fields: <
key: "~"
value: <
integer_value: 1
>
>
>
>
>
>
update_mask: <
field_paths: "`*`.`\\``"
field_paths: "`*`.`~`"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,29 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# If the only values in the input are ServerTimestamps, then no update operation
# should be produced.
description: "update-paths: ServerTimestamp alone"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "\"ServerTimestamp\""
request: <
database: "projects/projectID/databases/(default)"
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "a"
set_to_server_value: REQUEST_TIME
>
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,56 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A document can have more than one ServerTimestamp field. Since all the
# ServerTimestamp fields are removed, the only field in the update is "a".
description: "update-paths: multiple ServerTimestamp fields"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "b"
>
field_paths: <
field: "c"
>
json_values: "1"
json_values: "\"ServerTimestamp\""
json_values: "{\"d\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "c"
>
current_document: <
exists: true
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
field_transforms: <
field_path: "c.d"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,49 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A ServerTimestamp value can occur at any depth. In this case, the transform
# applies to the field path "b.c". Since "c" is removed from the update, "b"
# becomes empty, so it is also removed from the update.
description: "update-paths: nested ServerTimestamp field"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "b"
>
json_values: "1"
json_values: "{\"c\": \"ServerTimestamp\"}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
field_paths: "b"
>
current_document: <
exists: true
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b.c"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,15 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# There cannot be an array value anywhere on the path from the document root to
# the ServerTimestamp sentinel. Firestore transforms don't support array indexing.
description: "update-paths: ServerTimestamp cannot be anywhere inside an array value"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "[1, {\"b\": \"ServerTimestamp\"}]"
is_error: true
>
@@ -0,0 +1,15 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The ServerTimestamp sentinel must be the value of a field. Firestore transforms
# don't support array indexing.
description: "update-paths: ServerTimestamp cannot be in an array value"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
json_values: "[1, 2, \"ServerTimestamp\"]"
is_error: true
>
@@ -0,0 +1,49 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# A key with the special ServerTimestamp sentinel is removed from the data in the
# update operation. Instead it appears in a separate Transform operation. Note
# that in these tests, the string "ServerTimestamp" should be replaced with the
# special ServerTimestamp value.
description: "update-paths: ServerTimestamp with data"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
field_paths: <
field: "a"
>
field_paths: <
field: "b"
>
json_values: "1"
json_values: "\"ServerTimestamp\""
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
current_document: <
exists: true
>
>
writes: <
transform: <
document: "projects/projectID/databases/(default)/documents/C/d"
field_transforms: <
field_path: "b"
set_to_server_value: REQUEST_TIME
>
>
>
>
>
@@ -0,0 +1,40 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Update call supports a last-update-time precondition.
description: "update-paths: last-update-time precondition"
update_paths: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
precondition: <
update_time: <
seconds: 42
>
>
field_paths: <
field: "a"
>
json_values: "1"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
integer_value: 1
>
>
>
update_mask: <
field_paths: "a"
>
current_document: <
update_time: <
seconds: 42
>
>
>
>
>
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In the input data, one field cannot be a prefix of another.
description: "update: prefix #1"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a.b\": 1, \"a\": 2}"
is_error: true
>
@@ -0,0 +1,11 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In the input data, one field cannot be a prefix of another.
description: "update: prefix #2"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": 1, \"a.b\": 2}"
is_error: true
>
@@ -0,0 +1,12 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In the input data, one field cannot be a prefix of another, even if the values
# could in principle be combined.
description: "update: prefix #3"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a\": {\"b\": 1}, \"a.d\": 2}"
is_error: true
>
+45
View File
@@ -0,0 +1,45 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# In a field path, any component beginning with a non-letter or underscore is
# quoted.
description: "update: non-letter starting chars are quoted, except underscore"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"_0.1.+2\": 1}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "_0"
value: <
map_value: <
fields: <
key: "1"
value: <
map_value: <
fields: <
key: "+2"
value: <
integer_value: 1
>
>
>
>
>
>
>
>
>
update_mask: <
field_paths: "_0.`1`.`+2`"
>
current_document: <
exists: true
>
>
>
>
@@ -0,0 +1,45 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Update method splits only top-level keys at dots. Keys at other levels are
# taken literally.
description: "update: Split on dots for top-level keys only"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"h.g\": {\"j.k\": 6}}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "h"
value: <
map_value: <
fields: <
key: "g"
value: <
map_value: <
fields: <
key: "j.k"
value: <
integer_value: 6
>
>
>
>
>
>
>
>
>
update_mask: <
field_paths: "h.g"
>
current_document: <
exists: true
>
>
>
>
+44
View File
@@ -0,0 +1,44 @@
# DO NOT MODIFY. This file was generated by
# github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
# The Update method splits top-level keys at dots.
description: "update: split on dots"
update: <
doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
json_data: "{\"a.b.c\": 1}"
request: <
database: "projects/projectID/databases/(default)"
writes: <
update: <
name: "projects/projectID/databases/(default)/documents/C/d"
fields: <
key: "a"
value: <
map_value: <
fields: <
key: "b"
value: <
map_value: <
fields: <
key: "c"
value: <
integer_value: 1
>
>
>
>
>
>
>
>
>
update_mask: <
field_paths: "a.b.c"
>
current_document: <
exists: true
>
>
>
>

Some files were not shown because too many files have changed in this diff Show More