Skip to content

Commit a54f9a2

Browse files
committed
add test for checking the response of ocm .well-known endpoint
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
1 parent 150abf5 commit a54f9a2

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@ocm
2+
Feature: OCM Well-Known Endpoint
3+
As a user
4+
I want to verify the response of the .well-known/ocm endpoint
5+
So that I can ensure the configuration works correctly
6+
7+
8+
Scenario: check the ocm well-known endpoint response
9+
Given using server "LOCAL"
10+
When a user requests "/.well-known/ocm" with "GET" and no authentication
11+
Then the HTTP status code should be "200"
12+
And the JSON data of the response should match
13+
"""
14+
{
15+
"type": "object",
16+
"required": [
17+
"enabled",
18+
"apiVersion",
19+
"endPoint",
20+
"provider",
21+
"resourceTypes",
22+
"capabilities"
23+
],
24+
"properties": {
25+
"enabled": {
26+
"const": true
27+
},
28+
"apiVersion": {
29+
"const": "1.1.0"
30+
},
31+
"endPoint": {
32+
"pattern": "^%base_url%/ocm"
33+
},
34+
"provider": {
35+
"const": "oCIS"
36+
},
37+
"resourceTypes": {
38+
"type": "array",
39+
"minItems": 1,
40+
"maxItems": 1,
41+
"items": {
42+
"type": "object",
43+
"required": [
44+
"name",
45+
"shareTypes",
46+
"protocols"
47+
],
48+
"properties": {
49+
"name": {
50+
"const": "file"
51+
},
52+
"sharesTypes": {
53+
"type": "array",
54+
"minItems": 1,
55+
"maxItems": 1,
56+
"items": {
57+
"const": "user"
58+
}
59+
},
60+
"protocols": {
61+
"type": "object",
62+
"required": [
63+
"webdav"
64+
],
65+
"properties": {
66+
"webdav": {
67+
"const": "/dav/ocm"
68+
}
69+
}
70+
}
71+
}
72+
}
73+
},
74+
"capabilities": {
75+
"type": "array",
76+
"minItems": 1,
77+
"maxItems": 1,
78+
"items": {
79+
"const": "/invite-accepted"
80+
}
81+
}
82+
}
83+
}
84+
"""

0 commit comments

Comments
 (0)