From 070e7709ff0d18488ada3dcad38ac57ef73c3bef Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 18 Sep 2020 08:35:35 +0300 Subject: feat: add a rudimentary chunk server main program Also, add an initial subplot to document and verify acceptance criteria. --- obnam.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 obnam.md (limited to 'obnam.md') 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/ +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—a backup system" +author: Lars Wirzenius +bindings: + - obnam.yaml +functions: + - obnam.py + - runcmd.py + - daemon.py +... -- cgit v1.2.1