Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] ApiTests. enable auto accepting in api tests #7477

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The test runner source for UI tests
WEB_COMMITID=a5b442ff9db3e9317cf163c6e2158e073ceb909d
WEB_COMMITID=6fd967a12cfbe8fda936680ecf353c12eab78452
WEB_BRANCH=master
9 changes: 6 additions & 3 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dirs = {
"ocis": "/srv/app/tmp/ocis",
"ocisRevaDataRoot": "/srv/app/tmp/ocis/owncloud/data",
"ocisWrapper": "/drone/src/tests/ociswrapper",
"bannedPasswordList": "tests/config/drone/banned-password-list.txt",
}

# configuration
Expand Down Expand Up @@ -1147,6 +1148,10 @@ def e2eTests(ctx):
},
}

extra_server_environment = {
"FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST": "%s" % dirs["bannedPasswordList"],
}

e2e_trigger = {
"ref": [
"refs/heads/master",
Expand Down Expand Up @@ -1178,18 +1183,16 @@ def e2eTests(ctx):
restoreWebCache() + \
restoreWebPnpmCache() + \
(tikaService() if suite["tikaNeeded"] else []) + \
ocisServer("ocis", 4, [], tika_enabled = suite["tikaNeeded"]) + \
ocisServer("ocis", 4, [], extra_server_environment = extra_server_environment, tika_enabled = suite["tikaNeeded"]) + \
[{
"name": "e2e-tests",
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
"environment": {
"BASE_URL_OCIS": "ocis-server:9200",
"HEADLESS": "true",
"OCIS": "true",
"RETRY": "1",
"WEB_UI_CONFIG_FILE": "%s/%s" % (dirs["base"], dirs["ocisConfig"]),
"LOCAL_UPLOAD_DIR": "/uploads",
"API_TOKEN": "true",
},
"commands": [
"cd %s" % dirs["web"],
Expand Down
1 change: 1 addition & 0 deletions services/frontend/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func DefaultConfig() *config.Config {
},
},
LDAPServerWriteEnabled: true,
AutoAcceptShares: true,
Events: config.Events{
Endpoint: "127.0.0.1:9233",
Cluster: "ocis-cluster",
Expand Down
4 changes: 4 additions & 0 deletions tests/acceptance/config/behat-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ default:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:
- SettingsContext:

coreApiShareCreateSpecialToShares2:
paths:
Expand All @@ -84,6 +85,7 @@ default:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:
- SettingsContext:

coreApiSharees:
paths:
Expand All @@ -103,6 +105,7 @@ default:
- TrashbinContext:
- WebDavPropertiesContext:
- FilesVersionsContext:
- SettingsContext:

coreApiShareManagementBasicToShares:
paths:
Expand All @@ -124,6 +127,7 @@ default:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- SettingsContext:

coreApiShareOperationsToShares2:
paths:
Expand Down
364 changes: 186 additions & 178 deletions tests/acceptance/expected-failures-API-on-OCIS-storage.md

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiArchiver/downloadByPath.feature:44](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L44)
- [apiArchiver/downloadByPath.feature:47](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L47)
- [apiArchiver/downloadByPath.feature:73](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L73)
- [apiArchiver/downloadByPath.feature:131](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L131)
- [apiArchiver/downloadByPath.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L132)
- [apiArchiver/downloadByPath.feature:123](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L123)
- [apiArchiver/downloadByPath.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadByPath.feature#L124)

### [Downloaded /Shares tar contains resource (files|folder) with leading / in Response](https://github.com/owncloud/ocis/issues/4636)

- [apiArchiver/downloadById.feature:133](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L133)
- [apiArchiver/downloadById.feature:134](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L134)
- [apiArchiver/downloadById.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L125)
- [apiArchiver/downloadById.feature:126](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L126)

### [PROPFIND on accepted shares with identical names containing brackets exit with 404](https://github.com/owncloud/ocis/issues/4421)

- [apiSpacesShares/changingFilesShare.feature:14](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/changingFilesShare.feature#L14)

### [Shared mount folder gets deleted when overwritten by a file from personal space](https://github.com/owncloud/ocis/issues/7208)

- [apiSpacesShares/copySpaces.feature:528](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L528)
- [apiSpacesShares/copySpaces.feature:542](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L542)
- [apiSpacesShares/copySpaces.feature:510](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L510)
- [apiSpacesShares/copySpaces.feature:523](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L523)

#### [PATCH request for TUS upload with wrong checksum gives incorrect response](https://github.com/owncloud/ocis/issues/1755)

- [apiSpacesShares/shareUploadTUS.feature:203](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L203)
- [apiSpacesShares/shareUploadTUS.feature:218](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L218)
- [apiSpacesShares/shareUploadTUS.feature:283](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L283)
- [apiSpacesShares/shareUploadTUS.feature:187](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L187)
- [apiSpacesShares/shareUploadTUS.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L201)
- [apiSpacesShares/shareUploadTUS.feature:264](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature#L264)

### [Settings service user can list other peoples assignments](https://github.com/owncloud/ocis/issues/5032)

Expand Down
14 changes: 7 additions & 7 deletions tests/acceptance/expected-failures-webUI-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ Other free text and Markdown formatting can be used elsewhere in the document if
- [webUIFavorites/unfavoriteFile.feature:70](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L70)
- [webUIFavorites/unfavoriteFile.feature:86](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L87)
- [webUIFavorites/unfavoriteFile.feature:101](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFavorites/unfavoriteFile.feature#L102)
- [webUIResharing1/reshareUsers.feature:177](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L177)
- [webUIResharing1/reshareUsers.feature:68](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIResharing1/reshareUsers.feature#L68)

### [when sharer renames the shared resource, sharee get the updated name](https://github.com/owncloud/ocis/issues/2256)
- [webUIRenameFiles/renameFiles.feature:227](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L227)

### [Cannot create users with special characters](https://github.com/owncloud/ocis/issues/1417)
- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:35](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L35)
- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L36)
- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:37](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L37)
- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:38](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L38)
- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:39](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L39)
- [webUISharingAutocompletion/shareAutocompletionSpecialChars.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAutocompletion/shareAutocompletionSpecialChars.feature#L36)

### [Share additional info](https://github.com/owncloud/ocis/issues/1253)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:138](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L138)
- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:126](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L126)

### [Expiration date set is not implemented in user share](https://github.com/owncloud/ocis/issues/1250)
- [webUISharingInternalGroups/shareWithGroups.feature:244](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L244)
- [webUISharingInternalGroups/shareWithGroups.feature:228](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L228)

### [Different path for shares inside folder](https://github.com/owncloud/ocis/issues/1231)

### [Implement expiration date for shares](https://github.com/owncloud/ocis/issues/1250)
- [webUISharingInternalGroups/shareWithGroups.feature:222](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L222)
- [webUISharingInternalGroups/shareWithGroups.feature:208](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L208)
- [webUISharingExpirationDate/shareWithExpirationDate.feature:21](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingExpirationDate/shareWithExpirationDate.feature#L21)

### [Notifications endpoint](https://github.com/owncloud/ocis/issues/14)
Expand Down Expand Up @@ -120,4 +120,4 @@ Other free text and Markdown formatting can be used elsewhere in the document if
- [webUIRenameFiles/renameFiles.feature:250](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIRenameFiles/renameFiles.feature#L250)

### [PROPFIND to sub-folder of a shared resources with same name gives 404](https://github.com/owncloud/ocis/issues/3859)
- [webUISharingAcceptShares/acceptShares.feature:240](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L240)
- [webUISharingAcceptShares/acceptShares.feature:163](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L163)
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ Feature: sharing
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" shares file "textfile0.txt" with user "Brian" using the sharing API
And user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API
Then the HTTP status code should be "200"
And the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0"
Examples:
| ocs_api_version |
| 1 |
| 2 |
| 2 |
10 changes: 0 additions & 10 deletions tests/acceptance/features/apiAntivirus/antivirus.feature
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Feature: antivirus
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
And user "Brian" has accepted share "/uploadFolder" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/filesWithVirus/<filename>" to "/Shares/uploadFolder/<newfilename>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
Expand All @@ -161,7 +160,6 @@ Feature: antivirus
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
And user "Brian" has accepted share "/uploadFolder" offered by user "Alice"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
Expand All @@ -182,7 +180,6 @@ Feature: antivirus
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with group "group1"
And user "Brian" has accepted share "/uploadFolder" offered by user "Alice"
When user "Brian" uploads file "filesForUpload/filesWithVirus/<filename>" to "/Shares/uploadFolder/<newfilename>" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
Expand All @@ -205,7 +202,6 @@ Feature: antivirus
And user "Brian" has been added to group "group1"
And user "Alice" has created folder "uploadFolder"
And user "Alice" has shared folder "uploadFolder" with group "group1"
And user "Brian" has accepted share "/uploadFolder" offered by user "Alice"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/<filename>" to "/uploadFolder/<newfilename>" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
Expand Down Expand Up @@ -378,7 +374,6 @@ Feature: antivirus
And user "Alice" has been added to group "group1"
And user "Alice" has uploaded file with content "hello" to "/test.txt"
And user "Alice" has shared file "test.txt" with group "group1"
And user "Brian" has accepted share "/test.txt" offered by user "Alice"
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "test.txt" using the WebDAV API
Then the HTTP status code should be "201"
And user "Brian" should get a notification with subject "Virus found" and message:
Expand All @@ -400,7 +395,6 @@ Feature: antivirus
And user "Alice" has been added to group "group1"
And user "Alice" has uploaded file with content "hello" to "/test.txt"
And user "Alice" has shared file "test.txt" with group "group1"
And user "Brian" has accepted share "/test.txt" offered by user "Alice"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "/test.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And user "Brian" should get a notification with subject "Virus found" and message:
Expand All @@ -418,8 +412,6 @@ Feature: antivirus
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
And user "Alice" has uploaded file with content "this is a test file." to "/test.txt"
And user "Alice" has shared file "/test.txt" with user "Brian"
And user "Brian" has accepted share "/uploadFolder" offered by user "Alice"
And user "Brian" has accepted share "/test.txt" offered by user "Alice"
When user "Brian" uploads file with content "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" to "Shares/uploadFolder/test.txt" using the WebDAV API
Then the HTTP status code should be "204"
And user "Brian" should get a notification for resource "test.txt" with subject "Virus found" and message:
Expand Down Expand Up @@ -448,8 +440,6 @@ Feature: antivirus
And user "Alice" has shared folder "uploadFolder" with user "Brian" with permissions "all"
And user "Alice" has uploaded file with content "this is a test file." to "/test.txt"
And user "Alice" has shared file "/test.txt" with user "Brian"
And user "Brian" has accepted share "/uploadFolder" offered by user "Alice"
And user "Brian" has accepted share "/test.txt" offered by user "Alice"
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "/uploadFolder/test.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And user "Brian" should get a notification for resource "test.txt" with subject "Virus found" and message:
Expand Down
8 changes: 0 additions & 8 deletions tests/acceptance/features/apiArchiver/downloadById.feature
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ Feature: download multiple resources bundled into an archive
And user "Alice" has shared file "textfile1.txt" with user "Brian"
And user "Alice" has shared folder "my_data" with user "Brian"
And user "Alice" has shared folder "more_data" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
And user "Brian" has accepted share "/my_data" offered by user "Alice"
And user "Brian" has accepted share "/more_data" offered by user "Alice"
When user "Brian" downloads the archive of these items using the resource ids
| /Shares/textfile0.txt |
| /Shares/textfile1.txt |
Expand All @@ -114,10 +110,6 @@ Feature: download multiple resources bundled into an archive
And user "Alice" has shared file "textfile1.txt" with user "Brian"
And user "Alice" has shared folder "my_data" with user "Brian"
And user "Alice" has shared folder "more_data" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
And user "Brian" has accepted share "/my_data" offered by user "Alice"
And user "Brian" has accepted share "/more_data" offered by user "Alice"
When user "Brian" downloads the archive of "/Shares" using the resource id and setting these headers
| header | value |
| User-Agent | <user-agent> |
Expand Down
Loading