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