mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 12:19:37 -06:00
more spaces tests and examples
This commit is contained in:
@@ -100,6 +100,13 @@ PASSWORD=admin
|
||||
- disable a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X DELETE`
|
||||
- delete a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X DELETE -H'Purge: T'`
|
||||
- restore a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d"{}" -H"Restore: true"`
|
||||
- rename the space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"name":"नेपालि नाम"}'`
|
||||
- change description of the space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"description":"this contains important data"}'`
|
||||
- change quota of the space `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"quota":{"total":<bytes>}}'`
|
||||
- change image of space:
|
||||
1. upload an image file to the `.spaces` folder: `curl -k -u $USER:$PASSWORD https://localhost:9200/dav/spaces/<space-id>/.space/<file-name> -T <path-of-local-image> -v`
|
||||
2. note the id provided in the `Oc-Fileid` header
|
||||
3. set the image as "special-folder": `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"special":[{"specialFolder":{"name":"image"},"id":"<oc-fileid>"}]}'`
|
||||
- share a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$SHARE_API_PATH -d'space_ref=<space-id>&shareType=7&shareWith=<receiver-username>&role=<role>'`
|
||||
- Roles:
|
||||
- viewer
|
||||
@@ -118,29 +125,31 @@ PASSWORD=admin
|
||||
- root: `https://<server-uri>/dav/spaces/<space-id>`
|
||||
- [example commands for operations](#webdav)
|
||||
|
||||
| Test Case | Expected Result | Example / Comment |
|
||||
|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|--------------------|
|
||||
| create a space | space should exist | |
|
||||
| create a space with special characters as a name & description | space should exist | |
|
||||
| create a space, delete the space | space should not exist | |
|
||||
| create a space, share the space with a user | space should be accessible | |
|
||||
| create a space, share the space with a group | space should be accessible, space content is shared among all users | |
|
||||
| create a space, share the space with a group, disable the space | space should not be accessible | |
|
||||
| create a space, share the space with a user, disable the space, restore the space | space should be accessible | |
|
||||
| create a space, disable the space, delete the space, restore the space | it should not be possible to restore the space | |
|
||||
| create a space, disable the space, try to share the space | sharing the space should not be possible | |
|
||||
| create a space, try delete the space | it should not be possible to delete an enabled space | |
|
||||
| create & share a space with a group with viewer role, do CRUD file/folder operations with WebDAV | space content is readable but neither space not content should not be writable | |
|
||||
| create & share a space with a group with editor role, do CRUD file/folder operations with WebDAV | space and content should be writable | |
|
||||
| create a space, try CRUD file/folder operations with WebDAV on the space with a user that its not shared with | space and content should not be accessible | |
|
||||
| create a space with a quota, share the space, upload files till the quota is exceeded | upload should work till quota is full, uploads should not work when quota is full | |
|
||||
| share file/folders from inside a space (see other sharing section) | sharing works and obeys the permissions | |
|
||||
| create a space, rename the space | new name should be displayed in API calls and web | TODO curl examples |
|
||||
| create a space, change description of the space | new description should be displayed in API calls and web | TODO curl examples |
|
||||
| create a space, set quota, change quota of the space | new quota is obeyed | TODO curl examples |
|
||||
| create a space, set quota, change quota of the space to a value that is lower than the sum of data already stored | new quota is obeyed, new files cannot be uploaded | TODO curl examples |
|
||||
| try the various space operations with invalid data | good error output, server does not crash | |
|
||||
| try the various space operations without the correct permissions | operations are not possible without sufficient permissions | |
|
||||
| Test Case | Expected Result | Example / Comment |
|
||||
|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|-------------------|
|
||||
| create a space | space should exist | |
|
||||
| create a space with special characters as a name & description | space should exist | |
|
||||
| create a space, delete the space | space should not exist | |
|
||||
| create a space, share the space with a user | space should be accessible | |
|
||||
| create a space, share the space with a group | space should be accessible, space content is shared among all users | |
|
||||
| create a space, share the space with a group, disable the space | space should not be accessible | |
|
||||
| create a space, share the space with a user, disable the space, restore the space | space should be accessible | |
|
||||
| create a space, disable the space, delete the space, restore the space | it should not be possible to restore the space | |
|
||||
| create a space, disable the space, try to share the space | sharing the space should not be possible | |
|
||||
| create a space, try delete the space | it should not be possible to delete an enabled space | |
|
||||
| create & share a space with a group with viewer role, do CRUD file/folder operations with WebDAV | space content is readable but neither space not content should not be writable | |
|
||||
| create & share a space with a group with editor role, do CRUD file/folder operations with WebDAV | space and content should be writable | |
|
||||
| create a space, try CRUD file/folder operations with WebDAV on the space with a user that its not shared with | space and content should not be accessible | |
|
||||
| create a space with a quota, share the space, upload files till the quota is exceeded | upload should work till quota is full, uploads should not work when quota is full | |
|
||||
| share file/folders from inside a space (see other sharing section) | sharing works and obeys the permissions | |
|
||||
| create a space, rename the space | new name should be displayed in API calls and web | |
|
||||
| create a space, change description of the space | new description should be displayed in API calls and web | |
|
||||
| create a space, set quota, change quota of the space | new quota is obeyed | |
|
||||
| create a space, set quota, change quota of the space to a value that is lower than the sum of data already stored | new quota is obeyed, new files cannot be uploaded | |
|
||||
| try the various space operations with invalid data | good error output, server does not crash | |
|
||||
| try the various space operations without the correct permissions | operations are not possible without sufficient permissions | |
|
||||
| try the various space operations on personal and virtual spaces | server should not crash, good error responses | |
|
||||
| try the various space operations sending invalid data (invalid numbers, wrong types, invalid JSON, etc.) | server should not crash, good error responses | |
|
||||
|
||||
|
||||
## Web
|
||||
@@ -190,7 +199,7 @@ Prerequisite:
|
||||
| Share a folder with a group. | It is shared correctly. | |
|
||||
| Share a folder with userB giving edit permissions. As userB do CRUD operations on items inside the received folder | userB doesn't find any problem while interacting with files. | |
|
||||
| Use your mobile device to access the UI | All elements reachable | |
|
||||
| TODO spaces tests in web | | |
|
||||
| do tests mentioned in the [spaces](#spaces) section using the web-UI | | |
|
||||
|
||||
## Desktop Client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user