-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from go-kivik/copyRev
Support target rev for copy command
- Loading branch information
Showing
14 changed files
with
159 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
cmd/kouchctl/cmd/testdata/Test_copy_RunE_emulated_COPY_with_rev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
PUT /qwerty/target?rev=7-qhk HTTP/1.1 | ||
Host: XXX | ||
Transfer-Encoding: chunked | ||
Accept: application/json | ||
Accept-Encoding: gzip | ||
Content-Length: 69 | ||
Content-Type: application/json | ||
User-Agent: Kivik chttp/4.0.0-prerelease (Language=goX.XX.X; Platform=amd64/linux) Kivik/4.0.0-prerelease Kivik CouchDB driver/4.0.0-prerelease | ||
|
||
45 | ||
{"id":"target","ok":true,"rev":"2-62e778c9ec09214dd685a981dcc24074"} | ||
|
||
0 | ||
|
3 changes: 3 additions & 0 deletions
3
cmd/kouchctl/cmd/testdata/Test_copy_RunE_emulated_COPY_with_rev__stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Debug mode enabled | ||
failed to read kouchconfig: open ~/.kouchctl/config: no such file or directory | ||
[copy] Will copy: http://127.0.0.1:XXX/asdf/src to http://127.0.0.1:XXX/qwerty/target |
3 changes: 3 additions & 0 deletions
3
cmd/kouchctl/cmd/testdata/Test_copy_RunE_emulated_COPY_with_rev__stdout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
OK: true | ||
ID: target | ||
Rev: 2-62e778c9ec09214dd685a981dcc24074 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
COPY /jkl/src HTTP/1.1 | ||
COPY /jjj/src HTTP/1.1 | ||
Host: XXX | ||
Accept: application/json | ||
Accept-Encoding: gzip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Debug mode enabled | ||
failed to read kouchconfig: open ~/.kouchctl/config: no such file or directory | ||
[copy] Will copy: http://127.0.0.1:XXX/jkl/src to target | ||
[copy] Will copy: http://127.0.0.1:XXX/jjj/src to target |
9 changes: 9 additions & 0 deletions
9
cmd/kouchctl/cmd/testdata/Test_copy_RunE_remote_COPY_with_--target-rev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
COPY /jkl/src HTTP/1.1 | ||
Host: XXX | ||
Accept: application/json | ||
Accept-Encoding: gzip | ||
Content-Length: 0 | ||
Content-Type: application/json | ||
Destination: target?rev=3-lkjds | ||
User-Agent: Kivik chttp/4.0.0-prerelease (Language=goX.XX.X; Platform=amd64/linux) Kivik/4.0.0-prerelease Kivik CouchDB driver/4.0.0-prerelease | ||
|
3 changes: 3 additions & 0 deletions
3
cmd/kouchctl/cmd/testdata/Test_copy_RunE_remote_COPY_with_--target-rev__stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Debug mode enabled | ||
failed to read kouchconfig: open ~/.kouchctl/config: no such file or directory | ||
[copy] Will copy: http://127.0.0.1:XXX/jkl/src to target |
3 changes: 3 additions & 0 deletions
3
cmd/kouchctl/cmd/testdata/Test_copy_RunE_remote_COPY_with_--target-rev__stdout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
OK: true | ||
ID: target | ||
Rev: 2-62e778c9ec09214dd685a981dcc24074 |
9 changes: 9 additions & 0 deletions
9
cmd/kouchctl/cmd/testdata/Test_copy_RunE_remote_COPY_with_rev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
COPY /jkl/src HTTP/1.1 | ||
Host: XXX | ||
Accept: application/json | ||
Accept-Encoding: gzip | ||
Content-Length: 0 | ||
Content-Type: application/json | ||
Destination: target?rev=3-xxx | ||
User-Agent: Kivik chttp/4.0.0-prerelease (Language=goX.XX.X; Platform=amd64/linux) Kivik/4.0.0-prerelease Kivik CouchDB driver/4.0.0-prerelease | ||
|
3 changes: 3 additions & 0 deletions
3
cmd/kouchctl/cmd/testdata/Test_copy_RunE_remote_COPY_with_rev__stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Debug mode enabled | ||
failed to read kouchconfig: open ~/.kouchctl/config: no such file or directory | ||
[copy] Will copy: http://127.0.0.1:XXX/jkl/src to target |
3 changes: 3 additions & 0 deletions
3
cmd/kouchctl/cmd/testdata/Test_copy_RunE_remote_COPY_with_rev__stdout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
OK: true | ||
ID: target | ||
Rev: 2-62e778c9ec09214dd685a981dcc24074 |