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.
 
 
 

68 lines
2.2 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-paths: 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_paths: <
  16. doc_ref_path: "projects/projectID/databases/(default)/documents/C/d"
  17. field_paths: <
  18. field: "a"
  19. field: "b"
  20. >
  21. field_paths: <
  22. field: "a"
  23. field: "c"
  24. >
  25. json_values: "7"
  26. json_values: "\"ServerTimestamp\""
  27. request: <
  28. database: "projects/projectID/databases/(default)"
  29. writes: <
  30. update: <
  31. name: "projects/projectID/databases/(default)/documents/C/d"
  32. fields: <
  33. key: "a"
  34. value: <
  35. map_value: <
  36. fields: <
  37. key: "b"
  38. value: <
  39. integer_value: 7
  40. >
  41. >
  42. >
  43. >
  44. >
  45. >
  46. update_mask: <
  47. field_paths: "a.b"
  48. >
  49. current_document: <
  50. exists: true
  51. >
  52. >
  53. writes: <
  54. transform: <
  55. document: "projects/projectID/databases/(default)/documents/C/d"
  56. field_transforms: <
  57. field_path: "a.c"
  58. set_to_server_value: REQUEST_TIME
  59. >
  60. >
  61. >
  62. >
  63. >