From 61aca01941d3bdf324a207f2b53dbf7128169142 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 6 Feb 2021 18:03:49 +0200 Subject: test: add scenario for checking chunk-size --- obnam.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'obnam.md') 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` – find chunks on the server whose metadata indicates their contents has a given SHA256 checksum * `GET /chunks?generation=true` – find generation chunks +* `GET /chunks?data=True` – 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 -- cgit v1.2.1