summaryrefslogtreecommitdiff
path: root/rest-api-spec/test/update/35_external_version.yaml
blob: a3ca3a9e3fe4b09c7c7abbc35c88fcee768aac9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
"External version":

 - do:
      update:
          index:        test_1
          type:         test
          id:           1
          version:      2
          version_type: external
          body:
            doc:        { foo: baz }
            upsert:     { foo: bar }

 - match:   { _version: 2 }

 - do:
      catch:            conflict
      update:
          index:        test_1
          type:         test
          id:           1
          version:      2
          version_type: external
          body:
            doc:        { foo: baz }
            upsert:     { foo: bar }

 - do:
      update:
          index:        test_1
          type:         test
          id:           1
          version:      3
          version_type: external
          body:
            doc:        { foo: baz }
            upsert:     { foo: bar }

 - match:   { _version: 3 }