blob: b95cbe7d27da2f40d573a038bded591208a4ea06 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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—a backup system"
author: Lars Wirzenius
bindings:
- obnam.yaml
functions:
- obnam.py
- runcmd.py
- daemon.py
...
|