You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

59 lines
2.1 KiB

  1. # DO NOT MODIFY. This file was generated by
  2. # github.com/GoogleCloudPlatform/google-cloud-common/testing/firestore/cmd/generate-firestore-tests/generate-firestore-tests.go.
  3. # For updates, top-level paths in json-like map inputs are split on the dot. That
  4. # is, an input {"a.b.c": 7} results in an update to field c of object b of object
  5. # a with value 7. In order to specify this behavior, the update must use a
  6. # fieldmask "a.b.c". However, fieldmasks are only used for concrete values -
  7. # transforms are separately encoded in a DocumentTransform_FieldTransform array.
  8. # This test exercises a bug found in python
  9. # (https://github.com/googleapis/google-cloud-python/issues/7215) in which nested
  10. # transforms ({"a.c": "ServerTimestamp"}) next to nested values ({"a.b": 7})
  11. # incorrectly caused the fieldmask "a" to be set, which has the effect of wiping
  12. # out all data in "a" other than what was specified in the json-like input.
  13. # Instead, as this test specifies, transforms should not affect the fieldmask.
  14. description: "update: Nested transforms should not affect the field mask, even\nwhen there are other values that do. Transforms should only affect the\nDocumentTransform_FieldTransform list."
  15. update: <
  16. doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
  17. json_data: "{\"a.b\": 7, \"a.c\": \"ServerTimestamp\"}"
  18. request: <
  19. database: "projects/projectID/databases/(default)"
  20. writes: <
  21. update: <
  22. name: "projects/projectID/databases/(default)/documents/C/d"
  23. fields: <
  24. key: "a"
  25. value: <
  26. map_value: <
  27. fields: <
  28. key: "b"
  29. value: <
  30. integer_value: 7
  31. >
  32. >
  33. >
  34. >
  35. >
  36. >
  37. update_mask: <
  38. field_paths: "a.b"
  39. >
  40. current_document: <
  41. exists: true
  42. >
  43. >
  44. writes: <
  45. transform: <
  46. document: "projects/projectID/databases/(default)/documents/C/d"
  47. field_transforms: <
  48. field_path: "a.c"
  49. set_to_server_value: REQUEST_TIME
  50. >
  51. >
  52. >
  53. >
  54. >