blob: fce0b18c61a947da4c0c4b8f38acf7aa6de983a5 (
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
|
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
}
|