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

Make sure urlparams are correctly injected in global routes #14626

Conversation

nickvergessen
Copy link
Member

Fix #14621

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@@ -78,6 +78,17 @@
['name' => 'contactsMenu#findOne', 'url' => '/contactsmenu/findOne', 'verb' => 'POST'],
['name' => 'WalledGarden#get', 'url' => '/204', 'verb' => 'GET'],
['name' => 'Search#search', 'url' => '/core/search', 'verb' => 'GET'],

// Legacy routes that need to be globally available while they are handled by an app
['name' => 'viewcontroller#showFile', 'url' => '/f/{fileid}', 'verb' => 'GET', 'app' => 'files'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should also be possible, to move those to the respective apps, when at the same time we allow defining a root' => '/cloud' similar to OCS urls.
Just not sure how this breaks existing route generations (because all lowercase instead of CamelCase controller names, which is why the hacks in lib/private/AppFramework/Routing/RouteConfig.php were necessary)

if (strpos($controllerName, '\\Controller\\') !== false) {
// This is from a global registered app route that is not enabled.
[/*OC(A)*/, $app, /* Controller/Name*/] = explode('\\', $controllerName, 3);
throw new HintException('App ' . strtolower($app) . ' is not enabled');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is inaccurate for cloud_federation_api as it shows cloudfederationapi instead.
Worth adding another hack? however it's pretty useless anyway.

@faily-bot
Copy link

faily-bot bot commented Mar 11, 2019

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 16911: failure

TESTS=integration-federation_features

  • build/integration/federation_features/federated.feature:183
  • build/integration/federation_features/federated.feature:232
  • build/integration/federation_features/federated.feature:247
  • build/integration/federation_features/federated.feature:263
Show full log
[Mon Mar 11 12:26:48 2019] 127.0.0.1:35722 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Mon Mar 11 12:26:48 2019] 127.0.0.1:35724 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/outgoing_server2server_group_share_enabled
  Scenario: Reshare a federated shared file                                                             # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:183
    Given Using server "REMOTE"                                                                         # FederationContext::usingServer()
[Mon Mar 11 12:26:48 2019] 127.0.0.1:44086 [404]: /ocs/v2.php/cloud/users/user1
[Mon Mar 11 12:26:48 2019] 127.0.0.1:44088 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:26:49 2019] 127.0.0.1:44090 [200]: /ocs/v1.php/cloud/users/user1
[Mon Mar 11 12:26:49 2019] 127.0.0.1:44096 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                             # FederationContext::assureUserExists()
[Mon Mar 11 12:26:49 2019] 127.0.0.1:44100 [404]: /ocs/v2.php/cloud/users/user2
[Mon Mar 11 12:26:49 2019] 127.0.0.1:44102 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:26:49 2019] 127.0.0.1:44108 [200]: /ocs/v1.php/cloud/users/user2
[Mon Mar 11 12:26:49 2019] 127.0.0.1:44114 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                             # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                            # FederationContext::usingServer()
[Mon Mar 11 12:26:50 2019] 127.0.0.1:35756 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:26:50 2019] 127.0.0.1:35758 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:26:50 2019] 127.0.0.1:35766 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:26:50 2019] 127.0.0.1:35768 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                             # FederationContext::assureUserExists()
[Mon Mar 11 12:26:51 2019] 127.0.0.1:44136 [200]: /ocm-provider/
[Mon Mar 11 12:26:51 2019] 127.0.0.1:44138 [201]: /index.php/ocm/shares
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35774 [200]: /ocs/v1.php/apps/files_sharing/api/v1/shares
    And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
[Mon Mar 11 12:26:51 2019] 127.0.0.1:44140 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35784 [200]: //ocm-provider/
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35786 [201]: /index.php/ocm/notifications
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35792 [200]: //ocs-provider/
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35794 [200]: /ocs/v2.php/cloud/shares/8/accept?format=json
[Mon Mar 11 12:26:51 2019] 127.0.0.1:44142 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending/9
    And User "user1" from server "REMOTE" accepts last pending share                                    # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                           # FederationContext::usingServer()
    And As an "user1"                                                                                   # FederationContext::asAn()
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35798 [200]: //ocs-provider/
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35800 [200]: //status.php
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35802 [200]: //status.php
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35804 [200]: /index.php/apps/files_sharing/shareinfo?t=Z1tJvXEw7ucpq7z
[Mon Mar 11 12:26:51 2019] 127.0.0.1:44156 [200]: /ocs/v1.php/apps/files_sharing/api/v1/shares
    When creating a share with                                                                          # FederationContext::creatingShare()
      | path        | /textfile0 (2).txt |
      | shareType   | 0                  |
      | shareWith   | user2              |
      | permissions | 19                 |
    Then the OCS status code should be "100"                                                            # FederationContext::theOCSStatusCodeShouldBe()
      Failed asserting that SimpleXMLElement Object &000000006647fdcb000000007be6410c (
          0 => '404'
      ) matches expected '100'.
    And the HTTP status code should be "200"                                                            # FederationContext::theHTTPStatusCodeShouldBe()
    And Share fields of last share match with                                                           # FederationContext::checkShareFields()
      | id                     | A_NUMBER           |
      | item_type              | file               |
      | item_source            | A_NUMBER           |
      | share_type             | 0                  |
      | file_source            | A_NUMBER           |
      | path                   | /textfile0 (2).txt |
      | permissions            | 19                 |
      | stime                  | A_NUMBER           |
      | storage                | A_NUMBER           |
      | mail_send              | 1                  |
      | uid_owner              | user1              |
      | file_parent            | A_NUMBER           |
      | displayname_owner      | user1              |
      | share_with             | user2              |
      | share_with_displayname | user2              |
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35806 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:26:51 2019] 127.0.0.1:35812 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:26:52 2019] 127.0.0.1:35820 [200]: //ocm-provider/
[Mon Mar 11 12:26:52 2019] 127.0.0.1:35822 [400]: /index.php/ocm/notifications
[Mon Mar 11 12:26:52 2019] error while sending notification for federated share: Client error: `POST http://localhost:8080/index.php/ocm/notifications` resulted in a `400 Bad request` response:
{"message":"Can not find share with ID: 8"}

[Mon Mar 11 12:26:58 2019] 127.0.0.1:36008 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Mon Mar 11 12:26:58 2019] 127.0.0.1:36012 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/outgoing_server2server_group_share_enabled
  Scenario: Overwrite a federated shared folder as recipient                                             # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:232
    Given Using server "REMOTE"                                                                          # FederationContext::usingServer()
[Mon Mar 11 12:26:58 2019] 127.0.0.1:44376 [404]: /ocs/v2.php/cloud/users/user1
[Mon Mar 11 12:26:58 2019] 127.0.0.1:44382 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:26:58 2019] 127.0.0.1:44384 [200]: /ocs/v1.php/cloud/users/user1
[Mon Mar 11 12:26:58 2019] 127.0.0.1:44390 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                              # FederationContext::assureUserExists()
[Mon Mar 11 12:26:59 2019] 127.0.0.1:44392 [404]: /ocs/v2.php/cloud/users/user2
[Mon Mar 11 12:26:59 2019] 127.0.0.1:44394 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:26:59 2019] 127.0.0.1:44398 [200]: /ocs/v1.php/cloud/users/user2
[Mon Mar 11 12:26:59 2019] 127.0.0.1:44408 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                              # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                             # FederationContext::usingServer()
[Mon Mar 11 12:26:59 2019] 127.0.0.1:36050 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:26:59 2019] 127.0.0.1:36052 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36060 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36064 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                              # FederationContext::assureUserExists()
[Mon Mar 11 12:27:00 2019] 127.0.0.1:44434 [200]: /ocm-provider/
[Mon Mar 11 12:27:00 2019] 127.0.0.1:44436 [201]: /index.php/ocm/shares
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36066 [200]: /ocs/v1.php/apps/files_sharing/api/v1/shares
    And User "user0" from server "LOCAL" shares "/PARENT" with user "user1" from server "REMOTE"         # FederationContext::federateSharing()
[Mon Mar 11 12:27:00 2019] 127.0.0.1:44438 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36082 [200]: //ocm-provider/
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36084 [201]: /index.php/ocm/notifications
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36086 [200]: //ocs-provider/
[Mon Mar 11 12:27:00 2019] 127.0.0.1:36088 [200]: /ocs/v2.php/cloud/shares/10/accept?format=json
[Mon Mar 11 12:27:00 2019] 127.0.0.1:44440 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending/11
    And User "user1" from server "REMOTE" accepts last pending share                                     # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                            # FederationContext::usingServer()
    And As an "user1"                                                                                    # FederationContext::asAn()
    And User "user1" modifies text of "/textfile0.txt" with text "BLABLABLA"                             # FederationContext::modifyTextOfFile()
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36102 [200]: //ocs-provider/
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36104 [401]: /public.php/webdav/textfile0.txt
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36106 [404]: /public.php/webdav/textfile0.txt
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36108 [200]: //status.php
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36110 [200]: //status.php
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36112 [200]: /index.php/apps/files_sharing/shareinfo?t=45eSomYflrl3xyj
[Mon Mar 11 12:27:01 2019] Undefined index: size at /drone/src/github.com/nextcloud/server/lib/private/Files/View.php#1324
[Mon Mar 11 12:27:01 2019] Undefined index: storage_mtime at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#126
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36114 [207]: /public.php/webdav/
[Mon Mar 11 12:27:01 2019] Undefined index: etag at /drone/src/github.com/nextcloud/server/lib/private/Files/Storage/DAV.php#784
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36116 [200]: //status.php
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36118 [200]: //status.php
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36120 [200]: /index.php/apps/files_sharing/shareinfo?t=45eSomYflrl3xyj
[Mon Mar 11 12:27:01 2019] Undefined index: mimetype at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#108
[Mon Mar 11 12:27:01 2019] 127.0.0.1:44460 [404]: /remote.php/webdav/PARENT%20(2)/textfile0.txt
    When User "user1" uploads file "../../data/user1/files/textfile0.txt" to "/PARENT (2)/textfile0.txt" # FederationContext::userUploadsAFileTo()
      Client error: `PUT http://localhost:8180/remote.php/webdav/PARENT%20(2)/textfile0.txt` resulted in a `404 Not Found` response:
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:exception>Sabre\DA (truncated...)
       (GuzzleHttp\Exception\ClientException)
    And Downloading file "/PARENT (2)/textfile0.txt" with range "bytes=0-8"                              # FederationContext::downloadFileWithRange()
    Then Downloaded content should be "BLABLABLA"                                                        # FederationContext::downloadedContentShouldBe()
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36122 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:27:01 2019] 127.0.0.1:36134 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:27:02 2019] 127.0.0.1:36144 [200]: //ocm-provider/
[Mon Mar 11 12:27:02 2019] 127.0.0.1:36146 [400]: /index.php/ocm/notifications
[Mon Mar 11 12:27:02 2019] error while sending notification for federated share: Client error: `POST http://localhost:8080/index.php/ocm/notifications` resulted in a `400 Bad request` response:
{"message":"Can not find share with ID: 10"}

[Mon Mar 11 12:27:03 2019] 127.0.0.1:36190 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Mon Mar 11 12:27:03 2019] 127.0.0.1:36192 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/outgoing_server2server_group_share_enabled
  Scenario: Overwrite a federated shared file as recipient using old chunking                           # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:247
    Given Using server "REMOTE"                                                                         # FederationContext::usingServer()
[Mon Mar 11 12:27:03 2019] 127.0.0.1:44558 [404]: /ocs/v2.php/cloud/users/user1
[Mon Mar 11 12:27:03 2019] 127.0.0.1:44560 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:04 2019] 127.0.0.1:44562 [200]: /ocs/v1.php/cloud/users/user1
[Mon Mar 11 12:27:04 2019] 127.0.0.1:44582 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                             # FederationContext::assureUserExists()
[Mon Mar 11 12:27:04 2019] 127.0.0.1:44584 [404]: /ocs/v2.php/cloud/users/user2
[Mon Mar 11 12:27:04 2019] 127.0.0.1:44586 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:04 2019] 127.0.0.1:44594 [200]: /ocs/v1.php/cloud/users/user2
[Mon Mar 11 12:27:04 2019] 127.0.0.1:44614 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                             # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                            # FederationContext::usingServer()
[Mon Mar 11 12:27:04 2019] 127.0.0.1:36258 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:27:05 2019] 127.0.0.1:36262 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:05 2019] 127.0.0.1:36282 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:27:05 2019] 127.0.0.1:36292 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                             # FederationContext::assureUserExists()
[Mon Mar 11 12:27:05 2019] 127.0.0.1:44658 [200]: /ocm-provider/
[Mon Mar 11 12:27:05 2019] 127.0.0.1:44660 [201]: /index.php/ocm/shares
[Mon Mar 11 12:27:05 2019] 127.0.0.1:36294 [200]: /ocs/v1.php/apps/files_sharing/api/v1/shares
    And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
[Mon Mar 11 12:27:05 2019] 127.0.0.1:44662 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36314 [200]: //ocm-provider/
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36318 [201]: /index.php/ocm/notifications
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36322 [200]: //ocs-provider/
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36324 [200]: /ocs/v2.php/cloud/shares/11/accept?format=json
[Mon Mar 11 12:27:06 2019] 127.0.0.1:44668 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending/12
    And User "user1" from server "REMOTE" accepts last pending share                                    # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                           # FederationContext::usingServer()
    And As an "user1"                                                                                   # FederationContext::asAn()
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36332 [200]: //ocs-provider/
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36334 [401]: /public.php/webdav/
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36338 [207]: /public.php/webdav/
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36344 [200]: //status.php
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36346 [200]: //status.php
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36348 [200]: /index.php/apps/files_sharing/shareinfo?t=zNyDd5TkJPwHiW0
[Mon Mar 11 12:27:06 2019] 127.0.0.1:44686 [404]: /remote.php/webdav/textfile0%20(2).txt-chunking-42-3-0
    And user "user1" uploads chunk file "1" of "3" with "AAAAA" to "/textfile0 (2).txt"                 # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
      Client error: `PUT http://localhost:8180/remote.php/webdav/textfile0%20(2).txt-chunking-42-3-0` resulted in a `404 Not Found` response:
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:exception>Sabre\DA (truncated...)
       (GuzzleHttp\Exception\ClientException)
    And user "user1" uploads chunk file "2" of "3" with "BBBBB" to "/textfile0 (2).txt"                 # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
    And user "user1" uploads chunk file "3" of "3" with "CCCCC" to "/textfile0 (2).txt"                 # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
    When Downloading file "/textfile0 (2).txt" with range "bytes=0-4"                                   # FederationContext::downloadFileWithRange()
    Then Downloaded content should be "AAAAA"                                                           # FederationContext::downloadedContentShouldBe()
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36354 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:27:06 2019] 127.0.0.1:36394 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:27:07 2019] 127.0.0.1:36448 [200]: //ocm-provider/
[Mon Mar 11 12:27:07 2019] 127.0.0.1:36452 [400]: /index.php/ocm/notifications
[Mon Mar 11 12:27:07 2019] error while sending notification for federated share: Client error: `POST http://localhost:8080/index.php/ocm/notifications` resulted in a `400 Bad request` response:
{"message":"Can not find share with ID: 11"}

[Mon Mar 11 12:27:07 2019] 127.0.0.1:36530 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Mon Mar 11 12:27:08 2019] 127.0.0.1:36542 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/outgoing_server2server_group_share_enabled
  Scenario: Overwrite a federated shared folder as recipient using old chunking                  # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:263
    Given Using server "REMOTE"                                                                  # FederationContext::usingServer()
[Mon Mar 11 12:27:08 2019] 127.0.0.1:44914 [404]: /ocs/v2.php/cloud/users/user1
[Mon Mar 11 12:27:08 2019] 127.0.0.1:44922 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:08 2019] 127.0.0.1:44942 [200]: /ocs/v1.php/cloud/users/user1
[Mon Mar 11 12:27:08 2019] 127.0.0.1:44966 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                      # FederationContext::assureUserExists()
[Mon Mar 11 12:27:08 2019] 127.0.0.1:44974 [404]: /ocs/v2.php/cloud/users/user2
[Mon Mar 11 12:27:08 2019] 127.0.0.1:44984 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:09 2019] 127.0.0.1:45000 [200]: /ocs/v1.php/cloud/users/user2
[Mon Mar 11 12:27:09 2019] 127.0.0.1:45034 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                      # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                     # FederationContext::usingServer()
[Mon Mar 11 12:27:09 2019] 127.0.0.1:36684 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:27:09 2019] 127.0.0.1:36698 [200]: /ocs/v1.php/cloud/users
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36718 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36750 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                      # FederationContext::assureUserExists()
[Mon Mar 11 12:27:10 2019] 127.0.0.1:45128 [200]: /ocm-provider/
[Mon Mar 11 12:27:10 2019] 127.0.0.1:45130 [201]: /index.php/ocm/shares
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36760 [200]: /ocs/v1.php/apps/files_sharing/api/v1/shares
    And User "user0" from server "LOCAL" shares "/PARENT" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
[Mon Mar 11 12:27:10 2019] 127.0.0.1:45134 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36788 [200]: //ocm-provider/
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36792 [201]: /index.php/ocm/notifications
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36794 [200]: //ocs-provider/
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36798 [200]: /ocs/v2.php/cloud/shares/12/accept?format=json
[Mon Mar 11 12:27:10 2019] 127.0.0.1:45140 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending/13
    And User "user1" from server "REMOTE" accepts last pending share                             # FederationContext::acceptLastPendingShare()
    And Using server "REMOTE"                                                                    # FederationContext::usingServer()
    And As an "user1"                                                                            # FederationContext::asAn()
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36810 [200]: //ocs-provider/
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36814 [200]: //status.php
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36816 [200]: //status.php
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36818 [200]: /index.php/apps/files_sharing/shareinfo?t=m48soAOEi9k33Fz
[Mon Mar 11 12:27:10 2019] Undefined index: size at /drone/src/github.com/nextcloud/server/lib/private/Files/View.php#1324
[Mon Mar 11 12:27:10 2019] Undefined index: storage_mtime at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#126
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36822 [401]: /public.php/webdav/
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36826 [207]: /public.php/webdav/
[Mon Mar 11 12:27:10 2019] Undefined index: etag at /drone/src/github.com/nextcloud/server/lib/private/Files/Storage/DAV.php#784
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36830 [200]: //status.php
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36834 [200]: //status.php
[Mon Mar 11 12:27:10 2019] 127.0.0.1:36836 [200]: /index.php/apps/files_sharing/shareinfo?t=m48soAOEi9k33Fz
[Mon Mar 11 12:27:10 2019] Undefined index: mimetype at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#108
[Mon Mar 11 12:27:10 2019] 127.0.0.1:45162 [404]: /remote.php/webdav/PARENT%20(2)/textfile0.txt-chunking-42-3-0
    And user "user1" uploads chunk file "1" of "3" with "AAAAA" to "/PARENT (2)/textfile0.txt"   # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
      Client error: `PUT http://localhost:8180/remote.php/webdav/PARENT%20(2)/textfile0.txt-chunking-42-3-0` resulted in a `404 Not Found` response:
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:exception>Sabre\DA (truncated...)
       (GuzzleHttp\Exception\ClientException)
    And user "user1" uploads chunk file "2" of "3" with "BBBBB" to "/PARENT (2)/textfile0.txt"   # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
    And user "user1" uploads chunk file "3" of "3" with "CCCCC" to "/PARENT (2)/textfile0.txt"   # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
    When Downloading file "/PARENT (2)/textfile0.txt" with range "bytes=3-13"                    # FederationContext::downloadFileWithRange()
    Then Downloaded content should be "AABBBBBCCCC"                                              # FederationContext::downloadedContentShouldBe()
[Mon Mar 11 12:27:11 2019] 127.0.0.1:36842 [200]: /ocs/v1.php/cloud/users/user0
[Mon Mar 11 12:27:11 2019] 127.0.0.1:36884 [404]: /ocs/v2.php/cloud/users/user0
[Mon Mar 11 12:27:11 2019] 127.0.0.1:36928 [200]: //ocm-provider/
[Mon Mar 11 12:27:11 2019] 127.0.0.1:36932 [400]: /index.php/ocm/notifications
[Mon Mar 11 12:27:11 2019] error while sending notification for federated share: Client error: `POST http://localhost:8080/index.php/ocm/notifications` resulted in a `400 Bad request` response:
{"message":"Can not find share with ID: 12"}

TESTS=acceptance, TESTS-ACCEPTANCE=app-files

  • tests/acceptance/features/app-files.feature:154
Show full log
  Scenario: move a selection to another folder                                       # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:154
    Given I am logged in                                                             # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "Folder"                                         # FileListContext::iCreateANewFolderNamed()
      │ Create menu button in file list could not be clicked
      │ Exception message: Element is not currently visible and so may not be interacted with
      │ Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
      │ System info: host: 'bb5b769c8a6d', ip: '172.17.0.14', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_91'
      │ Driver info: driver.version: unknown
      │ Trying again
      │ 
    And I create a new folder named "Not selected folder"                            # FileListContext::iCreateANewFolderNamed()
    And I create a new folder named "Destination"                                    # FileListContext::iCreateANewFolderNamed()
    When I select "welcome.txt"                                                      # FileListContext::iSelect()
    And I select "Folder"                                                            # FileListContext::iSelect()
    And I start the move or copy operation for the selected files                    # FileListContext::iStartTheMoveOrCopyOperationForTheSelectedFiles()
    And I select "Destination" in the file picker                                    # FilePickerContext::iSelectInTheFilePicker()
      Row for file Destination in the file picker dialog could not be found after 100 seconds (NoSuchElementException)
    And I move to the last selected folder in the file picker                        # FilePickerContext::iMoveToTheLastSelectedFolderInTheFilePicker()
    Then I see that the file list does not contain a file named "welcome.txt"        # FileListContext::iSeeThatTheFileListDoesNotContainAFileNamed()
    And I see that the file list does not contain a file named "Folder"              # FileListContext::iSeeThatTheFileListDoesNotContainAFileNamed()
    And I see that the file list contains a file named "Not selected folder"         # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I enter in the folder named "Destination"                                    # FileListContext::iEnterInTheFolderNamed()
    And I see that the file list contains a file named "welcome.txt"                 # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I see that the file list contains a file named "Folder"                      # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I see that the file list does not contain a file named "Not selected folder" # FileListContext::iSeeThatTheFileListDoesNotContainAFileNamed()

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍 Also the code looks good 👍

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, code looks good!

@MorrisJobke MorrisJobke merged commit 33c34dd into master Mar 12, 2019
@ChristophWurst ChristophWurst deleted the bugfix/14621/make-sure-urlparams-are-correctly-injected-in-global-routes branch March 12, 2019 11:49
@leonklingele-work
Copy link

faily-bot was still complaining about failures yet this PR got merged?!

@MorrisJobke
Copy link
Member

faily-bot was still complaining about failures yet this PR got merged?!

Yes because there are some failures on master and we are currently looking into how to fix them. They slipped through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants