summaryrefslogtreecommitdiff
path: root/obnam.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-02-06 18:03:49 +0200
committerLars Wirzenius <liw@liw.fi>2021-02-06 18:16:45 +0200
commit61aca01941d3bdf324a207f2b53dbf7128169142 (patch)
tree861aa3b61e16e2a486c61eabf1bf2e27a223679e /obnam.md
parentad98db921aa3d710ad7c448c6a1b818f4359d73a (diff)
downloadobnam2-61aca01941d3bdf324a207f2b53dbf7128169142.tar.gz
test: add scenario for checking chunk-size
Diffstat (limited to 'obnam.md')
-rw-r--r--obnam.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/obnam.md b/obnam.md
index b41a118..34535a5 100644
--- a/obnam.md
+++ b/obnam.md
@@ -771,6 +771,10 @@ The server has the following API for managing chunks:
* `GET /chunks?sha256=xyzzy` &ndash; find chunks on the server whose
metadata indicates their contents has a given SHA256 checksum
* `GET /chunks?generation=true` &ndash; find generation chunks
+* `GET /chunks?data=True` &ndash; find chunks with file data
+ - this is meant for testing only
+ - it excludes generation chunks, and chunks used to store the
+ generation's SQLite file
HTTP status codes are used to indicate if a request succeeded or not,
using the customary meanings.
@@ -858,6 +862,7 @@ 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
+and server has 1 file chunks
~~~
We must be able to retrieve it.
@@ -1145,6 +1150,28 @@ given a manifest of the directory live restored in rest in rest.yaml
then files live.yaml and rest.yaml match
~~~
+## Set chunk size
+
+This scenario verifies that the user can set the chunk size in the
+configuration file. The chunk size only affects the chunks of live
+data.
+
+~~~scenario
+given an installed obnam
+given a running chunk server
+given a client config based on tiny-chunk-size.yaml
+given a file live/data.dat containing "abc"
+when I run obnam --config tiny-chunk-size.yaml backup
+then server has 3 file chunks
+~~~
+
+~~~{#tiny-chunk-size.yaml .file .yaml .numberLines}
+verify_tls_cert: false
+root: live
+chunk_size: 1
+~~~
+
+
## Backup or not for the right reason
The decision of whether to back up a file or keep the version in the