summaryrefslogtreecommitdiff
path: root/obnam.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-09-18 08:35:35 +0300
committerLars Wirzenius <liw@liw.fi>2020-09-18 19:49:55 +0300
commit070e7709ff0d18488ada3dcad38ac57ef73c3bef (patch)
tree215b32d7212c16493b29b19cdfb94e44140ee424 /obnam.md
parentaa3dd026c9a8c8407bccea0f1345f777afe0090c (diff)
downloadobnam2-070e7709ff0d18488ada3dcad38ac57ef73c3bef.tar.gz
feat: add a rudimentary chunk server main program
Also, add an initial subplot to document and verify acceptance criteria.
Diffstat (limited to 'obnam.md')
-rw-r--r--obnam.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/obnam.md b/obnam.md
new file mode 100644
index 0000000..b95cbe7
--- /dev/null
+++ b/obnam.md
@@ -0,0 +1,55 @@
+# Acceptance criteria
+
+[Subplot]: https://subplot.liw.fi/
+
+This chapter documents detailed acceptance criteria and how they are
+verified as scenarios for the [Subplot][] tool
+
+## Chunk server
+
+These scenarios verify that the chunk server works.
+
+### Chunk management
+
+This scenario verifies that a chunk can be uploaded and then
+retrieved, with its metadata, and then deleted. The chunk server has
+an API with just one endpoint, `/chunks`, and accepts the the POST,
+GET, and DELETE operations on it.
+
+To create a chunk, we use POST.
+
+~~~scenario
+given a 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
+and content-type is application/json
+and the JSON body has a field chunk_id, henceforth ID
+~~~
+
+To retrieve a chunk, we use GET, giving the chunk id in the path.
+
+~~~scenario
+when I GET /chunks/<ID>
+then HTTP status code is 200
+and content-type is application/octet-stream
+and chunk-meta is {"sha256":"abc","generation":null,"ended":null}
+and the body matches file data.dat
+~~~
+
+
+
+
+<!-- -------------------------------------------------------------------- -->
+
+
+---
+title: "Obnam2&mdash;a backup system"
+author: Lars Wirzenius
+bindings:
+ - obnam.yaml
+functions:
+ - obnam.py
+ - runcmd.py
+ - daemon.py
+...