aboutsummaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'testdata')
-rw-r--r--testdata/http_server/decrypt_test.data40
1 files changed, 40 insertions, 0 deletions
diff --git a/testdata/http_server/decrypt_test.data b/testdata/http_server/decrypt_test.data
new file mode 100644
index 0000000..fce0b18
--- /dev/null
+++ b/testdata/http_server/decrypt_test.data
@@ -0,0 +1,40 @@
+Testing HTTP API for Decrypt.
+
+>>> withValidRequest/body
+{"path_vault":"/plain.txt.vault"}
+
+<<< withValidRequest/Response/body
+{
+ "data": {
+ "path": "/plain.txt",
+ "path_vault": "/plain.txt.vault"
+ },
+ "code": 200
+}
+
+>>> withEmptyValue/body
+{"path_vault":""}
+
+<<< withEmptyValue/Response/body
+{
+ "message": "Decrypt: empty path_vault",
+ "code": 400
+}
+
+>>> withDirectory/body
+{"path_vault":"/.ssh"}
+
+<<< withDirectory/Response/body
+{
+ "message": "Decrypt: \"/.ssh\" is a directory",
+ "code": 400
+}
+
+>>> withFileNotExist/body
+{"path_vault":"/thisisnotexist"}
+
+<<< withFileNotExist/Response/body
+{
+ "message": "Decrypt \"/thisisnotexist\": file does not exist",
+ "code": 400
+}