Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

update reva, includes tus support #161

Merged
merged 1 commit into from
May 7, 2020

Conversation

butonic
Copy link
Member

@butonic butonic commented Apr 30, 2020

No description provided.

@update-docs
Copy link

update-docs bot commented Apr 30, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic butonic self-assigned this Apr 30, 2020
@butonic butonic added the enhancement New feature or request label Apr 30, 2020
@butonic butonic requested review from refs and PVince81 April 30, 2020 18:43
@butonic
Copy link
Member Author

butonic commented Apr 30, 2020

@C0rby hmmm ... your implement ocs to http status code mapping #696 is in here as well ... could the failing tests be related?

@skipOnOcV10 @issue-ocis-reva-11 @issue-ocis-reva-30 @issue-ocis-reva-31 @issue-ocis-reva-32 @issue-ocis-reva-33 @issue-ocis-reva-34 @issue-ocis-reva-35 | 88s
-- | --
422 | Scenario: using OCS with non-admin basic auth                                                                         # /srv/app/testrunner/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature:99 | 88s
423 | When the user "user0" requests these endpoints with "GET" with basic auth then the status codes should be as listed # AuthContext::userRequestsEndpointsWithBasicAuth() | 88s
424 | \| endpoint                                                    \| ocs-code \| http-code \| | 88s
425 | \| /ocs/v1.php/apps/files_external/api/v1/mounts               \| 998      \| 200       \| | 88s
426 | \| /ocs/v2.php/apps/files_external/api/v1/mounts               \| 998      \| 200       \| | 88s
427 | \| /ocs/v1.php/apps/files_sharing/api/v1/remote_shares         \| 998      \| 200       \| | 88s
428 | \| /ocs/v2.php/apps/files_sharing/api/v1/remote_shares         \| 998      \| 200       \| | 88s
429 | \| /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending \| 998      \| 200       \| | 88s
430 | \| /ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending \| 998      \| 200       \| | 88s
431 | \| /ocs/v1.php/cloud/apps                                      \| 998      \| 200       \| | 88s
432 | \| /ocs/v2.php/cloud/apps                                      \| 998      \| 200       \| | 88s
433 | \| /ocs/v1.php/cloud/groups                                    \| 998      \| 200       \| | 88s
434 | \| /ocs/v2.php/cloud/groups                                    \| 998      \| 200       \| | 88s
435 | \| /ocs/v1.php/cloud/users                                     \| 403      \| 200       \| | 88s
436 | \| /ocs/v2.php/cloud/users                                     \| 403      \| 200       \| | 88s
437 | \| /ocs/v1.php/config                                          \| 100      \| 200       \| | 88s
438 | \| /ocs/v2.php/config                                          \| 100      \| 200       \| | 88s
439 | \| /ocs/v1.php/privatedata/getattribute                        \| 998      \| 200       \| | 88s
440 | \| /ocs/v2.php/privatedata/getattribute                        \| 998      \| 200       \| | 88s
441 | Got unexpected HTTP code while sending request to endpoint /ocs/v2.php/apps/files_external/api/v1/mounts | 88s
442 | Failed asserting that 404 matches expected '200'.
Scenario: send POST requests to another user's webDav endpoints as normal user                                    # /srv/app/testrunner/tests/acceptance/features/apiAuthWebDav/webDavPOSTAuth.feature:35 | 134s
-- | --
795 | When user "user1" requests these endpoints with "POST" including body then the status codes should be as listed # OCSContext::userSendsRequestToTheseEndpointsWithBody() | 137s
796 | \| endpoint                                       \| http-code \| body          \| | 137s
797 | \| /remote.php/dav/files/user0/textfile1.txt      \| 404       \| doesnotmatter \| | 137s
798 | \| /remote.php/dav/files/user0/PARENTS            \| 404       \| doesnotmatter \| | 137s
799 | \| /remote.php/dav/files/user0/PARENTS/parent.txt \| 404       \| doesnotmatter \| | 137s
800 | Got unexpected HTTP code while sending request to endpoint /remote.php/dav/files/user0/textfile1.txt | 137s
801 | Failed asserting that 412 matches expected '404'.
@skipOnOcV10 @issue-ocis-reva-45 @issue-ocis-reva-64 | 223s
-- | --
1103 | Scenario Outline: Cannot create a share of a file or folder with invalid permissions   # /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:34 | 223s
1104 | Given using OCS API version "<ocs_api_version>"                                      # FeatureContext::usingOcsApiVersion() | 223s
1105 | And user "user1" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles() | 223s
1106 | When user "user0" creates a share using the sharing API with settings                # FeatureContext::userCreatesAShareWithSettings() | 223s
1107 | \| path        \| <item>        \| | 223s
1108 | \| shareWith   \| user1         \| | 223s
1109 | \| shareType   \| user          \| | 223s
1110 | \| permissions \| <permissions> \| | 223s
1111 | Then the OCS status code should be "<ocs_status_code>"                               # OCSContext::theOCSStatusCodeShouldBe() | 223s
1112 | And the HTTP status code should be "<http_status_code>"                              # FeatureContext::thenTheHTTPStatusCodeShouldBe() | 223s
1113 | And as "user1" entry "<item>" should not exist                                       # FeatureContext::asFileOrFolderShouldNotExist() | 223s
1114 |   | 223s
1115 | Examples: | 223s
1116 | \| ocs_api_version \| ocs_status_code \| http_status_code \| item          \| permissions \| | 223s
1117 | \| 1               \| 400             \| 200              \| textfile0.txt \| 0           \| | 223s
1118 | \| 2               \| 400             \| 200              \| textfile0.txt \| 0           \| | 223s
1119 | HTTP status code 400 is not the expected value 200 | 223s
1120 | Failed asserting that 400 matches expected '200'. | 223s
1121 | \| 1               \| 400             \| 200              \| PARENT        \| 0           \| | 223s
1122 | \| 2               \| 400             \| 200              \| PARENT        \| 0           \| | 223s
1123 | HTTP status code 400 is not the expected value 200 | 223s
1124 | Failed asserting that 400 matches expected '200'. | 223s
1125 | \| 1               \| 400             \| 200              \| textfile0.txt \| 32          \| | 224s
1126 | \| 2               \| 400             \| 200              \| textfile0.txt \| 32          \| | 224s
1127 | HTTP status code 400 is not the expected value 200 | 224s
1128 | Failed asserting that 400 matches expected '200'. | 224s
1129 | \| 1               \| 400             \| 200              \| PARENT        \| 32          \| | 224s
1130 | \| 2               \| 400             \| 200              \| PARENT        \| 32          \| | 224s
1131 | HTTP status code 400 is not the expected value 200 | 224s
1132 | Failed asserting that 400 matches expected '200'.
@skipOnOcV10 @issue-ocis-reva-45 @issue-ocis-reva-64 | 231s
-- | --
1200 | Scenario Outline: Creating a share of a file with no permissions should fail                                  # /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:123 | 231s
1201 | Given using OCS API version "<ocs_api_version>"                                                             # FeatureContext::usingOcsApiVersion() | 231s
1202 | And user "user1" has been created with default attributes and without skeleton files                        # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles() | 231s
1203 | And user "user0" has uploaded file with content "user0 file" to "randomfile.txt"                            # FeatureContext::userHasUploadedAFileWithContentTo() | 231s
1204 | When user "user0" shares file "randomfile.txt" with user "user1" with permissions "0" using the sharing API # FeatureContext::userSharesFileWithUserUsingTheSharingApi() | 231s
1205 | Then the OCS status code should be "400"                                                                    # OCSContext::theOCSStatusCodeShouldBe() | 231s
1206 | And the OCS status message should be "permissions 0 out of range 1 - 31"                                    # OCSContext::theOCSStatusMessageShouldBe() | 231s
1207 | And the HTTP status code should be "<http_status_code>"                                                     # FeatureContext::thenTheHTTPStatusCodeShouldBe() | 231s
1208 | And as "user1" file "randomfile.txt" should not exist                                                       # FeatureContext::asFileOrFolderShouldNotExist() | 231s
1209 |   | 231s
1210 | Examples: | 231s
1211 | \| ocs_api_version \| http_status_code \| | 231s
1212 | \| 1               \| 200              \| | 231s
1213 | \| 2               \| 200              \| | 232s
1214 | HTTP status code 400 is not the expected value 200 | 232s
1215 | Failed asserting that 400 matches expected '200'.
@skipOnOcV10 @issue-ocis-reva-64 | 235s
-- | --
1234 | Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours                    # /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:157 | 235s
1235 | Given using OCS API version "<ocs_api_version>"                                                      # FeatureContext::usingOcsApiVersion() | 235s
1236 | And user "user1" has been created with default attributes and without skeleton files                 # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles() | 235s
1237 | When user "user0" shares file "/doesNotExist/randomfile.txt" with user "user1" using the sharing API # FeatureContext::userSharesFileWithUserUsingTheSharingApi() | 235s
1238 | And the HTTP status code should be "<http_status_code>"                                              # FeatureContext::thenTheHTTPStatusCodeShouldBe() | 235s
1239 | And as "user1" file "randomfile.txt" should not exist                                                # FeatureContext::asFileOrFolderShouldNotExist() | 235s
1240 |   | 235s
1241 | Examples: | 235s
1242 | \| ocs_api_version \| http_status_code \| | 235s
1243 | \| 1               \| 200              \| | 235s
1244 | \| 2               \| 200              \| | 235s
1245 | HTTP status code 404 is not the expected value 200 | 235s
1246 | Failed asserting that 404 matches expected '200'. | 235s
1247 |   | 235s
1248 | @skipOnOcV10 @issue-ocis-reva-64 | 235s
1249 | Scenario Outline: more tests to demonstrate different ocis-reva issue 64 behaviours            # /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:171 | 235s
1250 | Given using OCS API version "<ocs_api_version>"                                              # FeatureContext::usingOcsApiVersion() | 235s
1251 | And user "user1" has been created with default attributes and without skeleton files         # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles() | 235s
1252 | When user "user0" shares file "/NotExistingFile.txt" with user "user1" using the sharing API # FeatureContext::userSharesFileWithUserUsingTheSharingApi() | 235s
1253 | And the HTTP status code should be "<http_status_code>"                                      # FeatureContext::thenTheHTTPStatusCodeShouldBe() | 235s
1254 | And as "user1" file "randomfile.txt" should not exist                                        # FeatureContext::asFileOrFolderShouldNotExist() | 235s
1255 |   | 235s
1256 | Examples: | 235s
1257 | \| ocs_api_version \| http_status_code \| | 235s
1258 | \| 1               \| 200              \| | 235s
1259 | \| 2               \| 200              \| | 236s
1260 | HTTP status code 404 is not the expected value 200 | 236s
1261 | Failed asserting that 404 matches expected '200'. | 236s
1262 |   | 236s
1263 | @skipOnOcV10 @issue-ocis-reva-45 @issue-ocis-reva-64 | 236s
1264 | Scenario Outline: Creating a share of a folder with no permissions should fail                           # /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:220 | 236s
1265 | Given using OCS API version "<ocs_api_version>"                                                        # FeatureContext::usingOcsApiVersion() | 236s
1266 | And user "user1" has been created with default attributes and without skeleton files                   # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles() | 236s
1267 | And user "user0" has created folder "/afolder"                                                         # FeatureContext::userHasCreatedFolder() | 236s
1268 | When user "user0" shares folder "afolder" with user "user1" with permissions "0" using the sharing API # FeatureContext::userSharesFileWithUserUsingTheSharingApi() | 236s
1269 | Then the OCS status code should be "400"                                                               # OCSContext::theOCSStatusCodeShouldBe() | 236s
1270 | And the OCS status message should be "permissions 0 out of range 1 - 31"                               # OCSContext::theOCSStatusMessageShouldBe() | 236s
1271 | And the HTTP status code should be "<http_status_code>"                                                # FeatureContext::thenTheHTTPStatusCodeShouldBe() | 236s
1272 | And as "user1" folder "afolder" should not exist                                                       # FeatureContext::asFileOrFolderShouldNotExist() | 236s
1273 |   | 236s
1274 | Examples: | 236s
1275 | \| ocs_api_version \| http_status_code \| | 236s
1276 | \| 1               \| 200              \| | 236s
1277 | \| 2               \| 200              \| | 236s
1278 | HTTP status code 400 is not the expected value 200 | 236s
1279 | Failed asserting that 400 matches expected '200'.
--- Failed scenarios: | 332s
-- | --
2017 |   | 332s
2018 | /srv/app/testrunner/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature:99 | 332s
2019 | /srv/app/testrunner/tests/acceptance/features/apiAuthWebDav/webDavPOSTAuth.feature:35 | 332s
2020 | /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:48 | 332s
2021 | /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:50 | 332s
2022 | /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:52 | 332s
2023 | /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:54 | 332s
2024 | /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:135 | 332s
2025 | /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:166 | 332s
2026 | /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:180 | 332s
2027 | /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:232 | 332s
2028 | /srv/app/testrunner/tests/acceptance/features/apiWebdavProperties/copyFile.feature:22 | 332s
2029 | /srv/app/testrunner/tests/acceptance/features/apiWebdavProperties/copyFile.feature:23 | 332s
2030 | /srv/app/testrunner/tests/acceptance/features/apiWebdavProperties/copyFile.feature:33 | 332s
2031 | /srv/app/testrunner/tests/acceptance/features/apiWebdavProperties/copyFile.feature:34 | 332s
2032 | /srv/app/testrunner/tests/acceptance/features/apiWebdavProperties/copyFile.feature:45 | 332s
2033 | /srv/app/testrunner/tests/acceptance/features/apiWebdavProperties/copyFile.feature:46 | 332s
2034 |   | 332s
2035 | 281 scenarios (265 passed, 16 failed) | 332s
2036 | 1984 steps (1952 passed, 16 failed, 16 skipped) | 332s
2037 | 4m6.35s (20.37Mb)

@individual-it
Copy link
Member

how should the TUS support be tested?

  1. Writing API tests inside of the oC10 structure?
  2. Testing through http handles in go like https://github.com/owncloud/ocis-hello/blob/master/pkg/proto/v0/hello.pb.web_test.go ?

@PVince81
Copy link
Contributor

PVince81 commented May 4, 2020

likely related / blocked by regression in Phoenix login: owncloud/ocis#241

@PVince81
Copy link
Contributor

PVince81 commented May 5, 2020

the regression was fixed, please rebase/update @butonic

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

still many issues:

    /srv/app/testrunner/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature:99
    /srv/app/testrunner/tests/acceptance/features/apiAuthWebDav/webDavPOSTAuth.feature:35
    /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:48
    /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:50
    /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:51
    /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:52
    /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:53
    /srv/app/testrunner/tests/acceptance/features/apiShareCreateSpecial2/createShareWithInvalidPermissions.feature:54
    /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:135
    /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:166
    /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:180
    /srv/app/testrunner/tests/acceptance/features/apiShareManagementBasic/createShare.feature:232

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

ocsGETAuth:

  @skipOnOcV10 @issue-ocis-reva-11 @issue-ocis-reva-30 @issue-ocis-reva-31 @issue-ocis-reva-32 @issue-ocis-reva-33 @issue-ocis-reva-34 @issue-ocis-reva-35
  Scenario: using OCS with non-admin basic auth                                                                         # /srv/www/htdocs/owncloud/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature:99                                                                 
    When the user "user0" requests these endpoints with "GET" with basic auth then the status codes should be as listed # AuthContext::userRequestsEndpointsWithBasicAuth()
      | endpoint                                                    | ocs-code | http-code |
      | /ocs/v1.php/apps/files_external/api/v1/mounts               | 998      | 200       |
      | /ocs/v2.php/apps/files_external/api/v1/mounts               | 998      | 200       |
      | /ocs/v1.php/apps/files_sharing/api/v1/remote_shares         | 998      | 200       |
      | /ocs/v2.php/apps/files_sharing/api/v1/remote_shares         | 998      | 200       |
      | /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending | 998      | 200       |
      | /ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending | 998      | 200       |
      | /ocs/v1.php/cloud/apps                                      | 998      | 200       |
      | /ocs/v2.php/cloud/apps                                      | 998      | 200       |
      | /ocs/v1.php/cloud/groups                                    | 998      | 200       |
      | /ocs/v2.php/cloud/groups                                    | 998      | 200       |
      | /ocs/v1.php/cloud/users                                     | 403      | 200       |
      | /ocs/v2.php/cloud/users                                     | 403      | 200       |
      | /ocs/v1.php/config                                          | 100      | 200       |
      | /ocs/v2.php/config                                          | 100      | 200       |
      | /ocs/v1.php/privatedata/getattribute                        | 998      | 200       |
      | /ocs/v2.php/privatedata/getattribute                        | 998      | 200       |
      Got unexpected HTTP code while sending request to endpoint /ocs/v2.php/apps/files_external/api/v1/mounts
      Failed asserting that 404 matches expected '200'.

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

restarted the build as now owncloud/core#37337 got merged

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

only one failure left now:

/srv/app/testrunner/tests/acceptance/features/apiAuthWebDav/webDavPOSTAuth.feature:35

@C0rby
Copy link
Contributor

C0rby commented May 7, 2020

The test that is now failing is the one I was talking about yesterday.
owncloud/product#27 (comment)

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

as discussed, @C0rby will disable the test for ocis in core for now and raise a ticket to track solving it in a clean way, as it's currently not clear what we want to expect from the test and want to get unblocked

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

ref owncloud/core#37359

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

restarted build as the core fix as been merged

expecting full green now 🤞

@PVince81 PVince81 merged commit 82c12c9 into owncloud:master May 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants