summaryrefslogtreecommitdiff
path: root/obnam.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-11-13 12:35:26 +0200
committerLars Wirzenius <liw@liw.fi>2020-11-13 13:19:02 +0200
commitfa6501f87041ca3d3a239988d4b1ae03d7442700 (patch)
tree1beed5eb44e1939c2702179896cceb52004c16c9 /obnam.md
parent2f129dee8841f0007977ba80b1518e94b728d94a (diff)
downloadobnam2-fa6501f87041ca3d3a239988d4b1ae03d7442700.tar.gz
refactor: split obnam's bindings, functions for clarity
The old subplot/obnam.{yaml,py} were starting to get large enough that it was hard to understand them. Also, were partly overlapping in functionality with runcmd.
Diffstat (limited to 'obnam.md')
-rw-r--r--obnam.md32
1 files changed, 19 insertions, 13 deletions
diff --git a/obnam.md b/obnam.md
index 21511de..b3646d3 100644
--- a/obnam.md
+++ b/obnam.md
@@ -222,7 +222,8 @@ it, and verify the results, and finally terminate the server.
We must be able to create a new chunk.
~~~scenario
-given a chunk server
+given an installed obnam
+and a running chunk server
and a file data.dat containing some random data
when I POST data.dat to /chunks, with chunk-meta: {"sha256":"abc"}
then HTTP status code is 201
@@ -271,7 +272,8 @@ We must get the right error if we try to retrieve a chunk that does
not exist.
~~~scenario
-given a chunk server
+given an installed obnam
+and a running chunk server
when I try to GET /chunks/any.random.string
then HTTP status code is 404
~~~
@@ -281,7 +283,8 @@ then HTTP status code is 404
We must get an empty result if searching for chunks that don't exist.
~~~scenario
-given a chunk server
+given an installed obnam
+and a running chunk server
when I GET /chunks?sha256=abc
then HTTP status code is 200
and content-type is application/json
@@ -293,7 +296,8 @@ and the JSON body matches {}
We must get the right error when deleting a chunk that doesn't exist.
~~~scenario
-given a chunk server
+given an installed obnam
+and a running chunk server
when I try to DELETE /chunks/any.random.string
then HTTP status code is 404
~~~
@@ -307,15 +311,13 @@ possible, but still useful requirement for a backup system.
~~~scenario
given an installed obnam
-and a chunk server
+and a running chunk server
and a client config based on smoke.yaml
and a file live/data.dat containing some random data
-when I invoke obnam backup smoke.yaml
-then backup command is successful
-and backup generation is GEN
-when I invoke obnam list smoke.yaml
-then backup command is successful
-and generation list contains <GEN>
+when I run obnam backup smoke.yaml
+then backup generation is GEN
+when I run obnam list smoke.yaml
+then generation list contains <GEN>
when I invoke obnam restore smoke.yaml <GEN> restore.db rest
then data in live and rest match
~~~
@@ -377,10 +379,14 @@ title: "Obnam2&mdash;a backup system"
author: Lars Wirzenius
documentclass: report
bindings:
- - subplot/obnam.yaml
+ - subplot/server.yaml
+ - subplot/client.yaml
+ - subplot/data.yaml
- subplot/vendored/runcmd.yaml
functions:
- - subplot/obnam.py
+ - subplot/server.py
+ - subplot/client.py
+ - subplot/data.py
- subplot/daemon.py
- subplot/vendored/runcmd.py
classes: