mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-03 11:28:38 -06:00
Merge pull request #10782 from owncloud/tests/check-ocm-wellKnown-response
[tests-only][full-ci] Add test for checking the response of ocm .well-known endpoint
This commit is contained in:
84
tests/acceptance/features/apiOcm/ocmEndpoint.feature
Normal file
84
tests/acceptance/features/apiOcm/ocmEndpoint.feature
Normal file
@@ -0,0 +1,84 @@
|
||||
@ocm
|
||||
Feature: ocm well-known URI
|
||||
As a user
|
||||
I want to verify the response of well-known URI
|
||||
So that I can ensure the configuration works correctly
|
||||
|
||||
|
||||
Scenario: check the ocm well-known endpoint response
|
||||
Given using server "LOCAL"
|
||||
When a user requests "/.well-known/ocm" with "GET" and no authentication
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"enabled",
|
||||
"apiVersion",
|
||||
"endPoint",
|
||||
"provider",
|
||||
"resourceTypes",
|
||||
"capabilities"
|
||||
],
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"const": true
|
||||
},
|
||||
"apiVersion": {
|
||||
"const": "1.1.0"
|
||||
},
|
||||
"endPoint": {
|
||||
"pattern": "^%base_url%/ocm"
|
||||
},
|
||||
"provider": {
|
||||
"const": "oCIS"
|
||||
},
|
||||
"resourceTypes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"shareTypes",
|
||||
"protocols"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "file"
|
||||
},
|
||||
"sharesTypes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"const": "user"
|
||||
}
|
||||
},
|
||||
"protocols": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"webdav"
|
||||
],
|
||||
"properties": {
|
||||
"webdav": {
|
||||
"const": "/dav/ocm"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"const": "/invite-accepted"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
Reference in New Issue
Block a user