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

Avoid duplicate App container creation #14548

Merged
merged 3 commits into from
Mar 8, 2019

Conversation

nickvergessen
Copy link
Member

Signed-off-by: Joas Schilling coding@schilljs.com

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@MorrisJobke
Copy link
Member

How to verify this?

try {
$this->container = \OC::$server->getRegisteredAppContainer($appName);
} catch (QueryException $e) {
$this->container = new \OC\AppFramework\DependencyInjection\DIContainer($appName, $urlParams);
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't the container need to be registered then in the server container to avoid it being instantiated twice again?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's what DIContainer does already.

@nickvergessen
Copy link
Member Author

How to verify this?

  1. Install this app: testapp.zip
  2. Enable it
  3. Add a break point in the constructor of OCA\TestApp\Manager\Manager or check the log file
  4. curl http://localhost/index.php/apps/testapp/api/test -u admin:admin

@rullzer
Copy link
Member

rullzer commented Mar 5, 2019

Ah ok so this doesn't solve the 2 constructor calls (let do that separatly). But it is quite elegant.

However. it does seem like our tests are not as clean as we'd like...

@MorrisJobke
Copy link
Member

CI failure :/

Signed-off-by: Joas Schilling <coding@schilljs.com>
@faily-bot
Copy link

faily-bot bot commented Mar 6, 2019

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 16809: failure

DB=mysql, ENABLE_REDIS=false, PHP=7.3

Show full log
There was 1 failure:

1) TrashbinTest::testExpireOldFiles
Failed asserting that null is identical to 'file2.txt'.

/drone/src/github.com/nextcloud/server/apps/files_trashbin/tests/TrashbinTest.php:186

--

There was 1 risky test:

1) OCA\TwoFactorBackupCodes\Tests\Db\BackupCodeMapperTest::testInsertArgonEncryptedCodes
This test did not perform any assertions

DB=mysqlmb4, ENABLE_REDIS=false, PHP=7.3

Show full log
There was 1 failure:

1) TrashbinTest::testExpireOldFiles
Failed asserting that null is identical to 'file2.txt'.

/drone/src/github.com/nextcloud/server/apps/files_trashbin/tests/TrashbinTest.php:186

--

There was 1 risky test:

1) OCA\TwoFactorBackupCodes\Tests\Db\BackupCodeMapperTest::testInsertArgonEncryptedCodes
This test did not perform any assertions

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
[Wed Mar  6 11:33:44 2019] 127.0.0.1:42508 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Wed Mar  6 11:33:44 2019] 127.0.0.1:42510 [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()
[Wed Mar  6 11:33:44 2019] 127.0.0.1:50876 [404]: /ocs/v2.php/cloud/users/user1
[Wed Mar  6 11:33:45 2019] 127.0.0.1:50878 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:33:45 2019] 127.0.0.1:50886 [200]: /ocs/v1.php/cloud/users/user1
[Wed Mar  6 11:33:45 2019] 127.0.0.1:50898 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                             # FederationContext::assureUserExists()
[Wed Mar  6 11:33:45 2019] 127.0.0.1:50902 [404]: /ocs/v2.php/cloud/users/user2
[Wed Mar  6 11:33:45 2019] 127.0.0.1:50904 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:33:47 2019] 127.0.0.1:50910 [200]: /ocs/v1.php/cloud/users/user2
[Wed Mar  6 11:33:47 2019] 127.0.0.1:50916 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                             # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                            # FederationContext::usingServer()
[Wed Mar  6 11:33:47 2019] 127.0.0.1:42558 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:33:47 2019] 127.0.0.1:42564 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42578 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42590 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                             # FederationContext::assureUserExists()
[Wed Mar  6 11:33:48 2019] 127.0.0.1:50956 [200]: /ocm-provider/
[Wed Mar  6 11:33:48 2019] 127.0.0.1:50958 [201]: /index.php/ocm/shares
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42594 [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()
[Wed Mar  6 11:33:48 2019] 127.0.0.1:50960 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42604 [200]: //ocm-provider/
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42606 [201]: /index.php/ocm/notifications
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42608 [200]: //ocs-provider/
[Wed Mar  6 11:33:48 2019] 127.0.0.1:42610 [200]: /ocs/v2.php/cloud/shares/8/accept?format=json
[Wed Mar  6 11:33:48 2019] 127.0.0.1:50962 [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()
[Wed Mar  6 11:33:49 2019] 127.0.0.1:42614 [200]: //ocs-provider/
[Wed Mar  6 11:33:49 2019] 127.0.0.1:42616 [200]: //status.php
[Wed Mar  6 11:33:49 2019] 127.0.0.1:42618 [200]: //status.php
[Wed Mar  6 11:33:49 2019] 127.0.0.1:42620 [200]: /index.php/apps/files_sharing/shareinfo?t=YSsamgMRGteZk21
[Wed Mar  6 11:33:49 2019] 127.0.0.1:50972 [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 &000000005e737bc7000000000a3e15af (
          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              |
[Wed Mar  6 11:33:50 2019] 127.0.0.1:42624 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:33:50 2019] 127.0.0.1:42642 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:33:51 2019] 127.0.0.1:42664 [200]: //ocm-provider/
[Wed Mar  6 11:33:51 2019] 127.0.0.1:42666 [400]: /index.php/ocm/notifications
[Wed Mar  6 11:33:51 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"}

[Wed Mar  6 11:34:23 2019] 127.0.0.1:43058 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Wed Mar  6 11:34:23 2019] 127.0.0.1:43062 [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()
[Wed Mar  6 11:34:23 2019] 127.0.0.1:51424 [404]: /ocs/v2.php/cloud/users/user1
[Wed Mar  6 11:34:23 2019] 127.0.0.1:51428 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:24 2019] 127.0.0.1:51436 [200]: /ocs/v1.php/cloud/users/user1
[Wed Mar  6 11:34:24 2019] 127.0.0.1:51468 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                              # FederationContext::assureUserExists()
[Wed Mar  6 11:34:24 2019] 127.0.0.1:51476 [404]: /ocs/v2.php/cloud/users/user2
[Wed Mar  6 11:34:24 2019] 127.0.0.1:51484 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:25 2019] 127.0.0.1:51506 [200]: /ocs/v1.php/cloud/users/user2
[Wed Mar  6 11:34:25 2019] 127.0.0.1:51538 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                              # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                             # FederationContext::usingServer()
[Wed Mar  6 11:34:25 2019] 127.0.0.1:43184 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:34:25 2019] 127.0.0.1:43192 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43212 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43226 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                              # FederationContext::assureUserExists()
[Wed Mar  6 11:34:26 2019] 127.0.0.1:51602 [200]: /ocm-provider/
[Wed Mar  6 11:34:26 2019] 127.0.0.1:51604 [201]: /index.php/ocm/shares
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43228 [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()
[Wed Mar  6 11:34:26 2019] 127.0.0.1:51606 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43252 [200]: //ocm-provider/
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43258 [201]: /index.php/ocm/notifications
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43260 [200]: //ocs-provider/
[Wed Mar  6 11:34:26 2019] 127.0.0.1:43262 [200]: /ocs/v2.php/cloud/shares/10/accept?format=json
[Wed Mar  6 11:34:26 2019] 127.0.0.1:51610 [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()
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43344 [200]: //ocs-provider/
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43350 [401]: /public.php/webdav/textfile0.txt
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43352 [404]: /public.php/webdav/textfile0.txt
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43354 [200]: //status.php
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43356 [200]: //status.php
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43358 [200]: /index.php/apps/files_sharing/shareinfo?t=d6dbNNBncgC8GHE
[Wed Mar  6 11:34:27 2019] Undefined index: size at /drone/src/github.com/nextcloud/server/lib/private/Files/View.php#1324
[Wed Mar  6 11:34:27 2019] Undefined index: storage_mtime at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#126
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43360 [207]: /public.php/webdav/
[Wed Mar  6 11:34:27 2019] Undefined index: etag at /drone/src/github.com/nextcloud/server/lib/private/Files/Storage/DAV.php#784
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43364 [200]: //status.php
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43366 [200]: //status.php
[Wed Mar  6 11:34:27 2019] 127.0.0.1:43368 [200]: /index.php/apps/files_sharing/shareinfo?t=d6dbNNBncgC8GHE
[Wed Mar  6 11:34:27 2019] Undefined index: mimetype at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#108
[Wed Mar  6 11:34:27 2019] 127.0.0.1:51698 [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()
[Wed Mar  6 11:34:28 2019] 127.0.0.1:43372 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:34:28 2019] 127.0.0.1:43418 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:34:29 2019] 127.0.0.1:43476 [200]: //ocm-provider/
[Wed Mar  6 11:34:29 2019] 127.0.0.1:43482 [400]: /index.php/ocm/notifications
[Wed Mar  6 11:34:29 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"}

[Wed Mar  6 11:34:30 2019] 127.0.0.1:43538 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Wed Mar  6 11:34:30 2019] 127.0.0.1:43548 [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()
[Wed Mar  6 11:34:30 2019] 127.0.0.1:51914 [404]: /ocs/v2.php/cloud/users/user1
[Wed Mar  6 11:34:30 2019] 127.0.0.1:51916 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:31 2019] 127.0.0.1:51936 [200]: /ocs/v1.php/cloud/users/user1
[Wed Mar  6 11:34:31 2019] 127.0.0.1:51992 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                             # FederationContext::assureUserExists()
[Wed Mar  6 11:34:31 2019] 127.0.0.1:52006 [404]: /ocs/v2.php/cloud/users/user2
[Wed Mar  6 11:34:32 2019] 127.0.0.1:52026 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:32 2019] 127.0.0.1:52050 [200]: /ocs/v1.php/cloud/users/user2
[Wed Mar  6 11:34:32 2019] 127.0.0.1:52092 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                             # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                            # FederationContext::usingServer()
[Wed Mar  6 11:34:32 2019] 127.0.0.1:43736 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:34:32 2019] 127.0.0.1:43742 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:33 2019] 127.0.0.1:43760 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:34:33 2019] 127.0.0.1:43796 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                             # FederationContext::assureUserExists()
[Wed Mar  6 11:34:33 2019] 127.0.0.1:52170 [200]: /ocm-provider/
[Wed Mar  6 11:34:33 2019] 127.0.0.1:52172 [201]: /index.php/ocm/shares
[Wed Mar  6 11:34:33 2019] 127.0.0.1:43804 [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()
[Wed Mar  6 11:34:33 2019] 127.0.0.1:52178 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Wed Mar  6 11:34:33 2019] 127.0.0.1:43830 [200]: //ocm-provider/
[Wed Mar  6 11:34:33 2019] 127.0.0.1:43834 [201]: /index.php/ocm/notifications
[Wed Mar  6 11:34:33 2019] 127.0.0.1:43836 [200]: //ocs-provider/
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43838 [200]: /ocs/v2.php/cloud/shares/11/accept?format=json
[Wed Mar  6 11:34:34 2019] 127.0.0.1:52184 [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()
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43848 [200]: //ocs-provider/
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43850 [401]: /public.php/webdav/
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43852 [207]: /public.php/webdav/
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43858 [200]: //status.php
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43860 [200]: //status.php
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43862 [200]: /index.php/apps/files_sharing/shareinfo?t=e52vKMWAVLK9Uow
[Wed Mar  6 11:34:34 2019] 127.0.0.1:52202 [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()
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43864 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:34:34 2019] 127.0.0.1:43878 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:34:35 2019] 127.0.0.1:43894 [200]: //ocm-provider/
[Wed Mar  6 11:34:35 2019] 127.0.0.1:43896 [400]: /index.php/ocm/notifications
[Wed Mar  6 11:34:35 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"}

[Wed Mar  6 11:34:36 2019] 127.0.0.1:43956 [200]: /ocs/v1.php/apps/testing/api/v1/app/files_sharing/incoming_server2server_group_share_enabled
[Wed Mar  6 11:34:36 2019] 127.0.0.1:43964 [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()
[Wed Mar  6 11:34:36 2019] 127.0.0.1:52332 [404]: /ocs/v2.php/cloud/users/user1
[Wed Mar  6 11:34:36 2019] 127.0.0.1:52340 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:37 2019] 127.0.0.1:52348 [200]: /ocs/v1.php/cloud/users/user1
[Wed Mar  6 11:34:37 2019] 127.0.0.1:52380 [200]: /ocs/v2.php/cloud/users/user1
    And user "user1" exists                                                                      # FederationContext::assureUserExists()
[Wed Mar  6 11:34:37 2019] 127.0.0.1:52386 [404]: /ocs/v2.php/cloud/users/user2
[Wed Mar  6 11:34:37 2019] 127.0.0.1:52392 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:38 2019] 127.0.0.1:52400 [200]: /ocs/v1.php/cloud/users/user2
[Wed Mar  6 11:34:38 2019] 127.0.0.1:52414 [200]: /ocs/v2.php/cloud/users/user2
    And user "user2" exists                                                                      # FederationContext::assureUserExists()
    And Using server "LOCAL"                                                                     # FederationContext::usingServer()
[Wed Mar  6 11:34:38 2019] 127.0.0.1:44056 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:34:38 2019] 127.0.0.1:44060 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:34:39 2019] 127.0.0.1:44064 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:34:39 2019] 127.0.0.1:44074 [200]: /ocs/v2.php/cloud/users/user0
    And user "user0" exists                                                                      # FederationContext::assureUserExists()
[Wed Mar  6 11:34:40 2019] 127.0.0.1:52440 [200]: /ocm-provider/
[Wed Mar  6 11:34:40 2019] 127.0.0.1:52442 [201]: /index.php/ocm/shares
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44078 [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()
[Wed Mar  6 11:34:40 2019] 127.0.0.1:52446 [200]: /ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44102 [200]: //ocm-provider/
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44104 [201]: /index.php/ocm/notifications
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44112 [200]: //ocs-provider/
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44116 [200]: /ocs/v2.php/cloud/shares/12/accept?format=json
[Wed Mar  6 11:34:40 2019] 127.0.0.1:52452 [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()
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44122 [200]: //ocs-provider/
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44124 [200]: //status.php
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44126 [200]: //status.php
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44128 [200]: /index.php/apps/files_sharing/shareinfo?t=Sizdc7Eq2XxIfQx
[Wed Mar  6 11:34:40 2019] Undefined index: size at /drone/src/github.com/nextcloud/server/lib/private/Files/View.php#1324
[Wed Mar  6 11:34:40 2019] Undefined index: storage_mtime at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#126
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44130 [401]: /public.php/webdav/
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44132 [207]: /public.php/webdav/
[Wed Mar  6 11:34:40 2019] Undefined index: etag at /drone/src/github.com/nextcloud/server/lib/private/Files/Storage/DAV.php#784
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44140 [200]: //status.php
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44142 [200]: //status.php
[Wed Mar  6 11:34:40 2019] 127.0.0.1:44144 [200]: /index.php/apps/files_sharing/shareinfo?t=Sizdc7Eq2XxIfQx
[Wed Mar  6 11:34:40 2019] Undefined index: mimetype at /drone/src/github.com/nextcloud/server/lib/private/Files/Cache/Watcher.php#108
[Wed Mar  6 11:34:40 2019] 127.0.0.1:52478 [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()
[Wed Mar  6 11:34:41 2019] 127.0.0.1:44146 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:34:41 2019] 127.0.0.1:44164 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:34:41 2019] 127.0.0.1:44184 [200]: //ocm-provider/
[Wed Mar  6 11:34:41 2019] 127.0.0.1:44186 [400]: /index.php/ocm/notifications
[Wed Mar  6 11:34:41 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=integration-sharing-v1

  • build/integration/features/sharing-v1.feature:58
Show full log
  Scenario: Creating a new public share                    # /drone/src/github.com/nextcloud/server/build/integration/features/sharing-v1.feature:58
[Wed Mar  6 11:35:53 2019] 127.0.0.1:47702 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:35:53 2019] 127.0.0.1:47710 [200]: /ocs/v1.php/cloud/users
[Wed Mar  6 11:35:53 2019] 127.0.0.1:47716 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:35:53 2019] 127.0.0.1:47718 [200]: /ocs/v2.php/cloud/users/user0
    Given user "user0" exists                              # FeatureContext::assureUserExists()
    And As an "user0"                                      # FeatureContext::asAn()
[Wed Mar  6 11:35:53 2019] 127.0.0.1:47720 [200]: /ocs/v1.php/apps/files_sharing/api/v1/shares
    When creating a share with                             # FeatureContext::creatingShare()
      | path      | welcome.txt |
      | shareType | 3           |
    Then the OCS status code should be "100"               # FeatureContext::theOCSStatusCodeShouldBe()
    And the HTTP status code should be "200"               # FeatureContext::theHTTPStatusCodeShouldBe()
[Wed Mar  6 11:35:54 2019] 127.0.0.1:47728 [404]: /index.php/s/HdFSiPtKdE6T7Qd/download
    And Public shared file "welcome.txt" can be downloaded # FeatureContext::checkPublicSharedFile()
      Client error: `GET http://localhost:8080/index.php/s/HdFSiPtKdE6T7Qd/download` resulted in a `404 Not Found` response (GuzzleHttp\Exception\ClientException)
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47790 [200]: /ocs/v1.php/cloud/users/user0
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47820 [404]: /ocs/v2.php/cloud/users/user0
[Wed Mar  6 11:35:55 2019] Login failed: 'user0' (Remote IP: '127.0.0.1')
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47826 [401]: /remote.php/webdav/myFileToComment.txt
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47830 [207]: /remote.php/dav/systemtags/
[Wed Mar  6 11:35:55 2019] Login failed: 'user0' (Remote IP: '127.0.0.1')
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47836 [401]: /remote.php/webdav/myFileToTag.txt
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47840 [404]: /remote.php/dav/addressbooks/users/admin/MyAddressbook
[Wed Mar  6 11:35:55 2019] 127.0.0.1:47850 [404]: /remote.php/dav/calendars/admin/MyCalendar

TESTS=acceptance, TESTS-ACCEPTANCE=app-files

  • tests/acceptance/features/app-files.feature:133
  • tests/acceptance/features/app-files.feature:144
  • tests/acceptance/features/app-files.feature:154
Show full log
  Scenario: show deleted files for a second time                      # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:133
    Given I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I open the "Deleted files" section                            # AppNavigationContext::iOpenTheSection()
    And I see that the current section is "Deleted files"             # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    And I open the "All files" section                                # AppNavigationContext::iOpenTheSection()
    And I see that the current section is "All files"                 # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    And I delete "welcome.txt"                                        # FileListContext::iDelete()
    When I open the "Deleted files" section                           # AppNavigationContext::iOpenTheSection()
    Then I see that the current section is "Deleted files"            # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    Then I see that the file list contains a file named "welcome.txt" # FileListContext::iSeeThatTheFileListContainsAFileNamed()
      Row for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)

  Scenario: move a file to another folder                                     # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:144
    Given I am logged in                                                      # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "Destination"                             # FileListContext::iCreateANewFolderNamed()
    When I start the move or copy operation for "welcome.txt"                 # FileListContext::iStartTheMoveOrCopyOperationFor()
    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 enter in the folder named "Destination"                             # FileListContext::iEnterInTheFolderNamed()
    And I see that the file list contains a file named "welcome.txt"          # FileListContext::iSeeThatTheFileListContainsAFileNamed()

  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()
    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()

TESTS=acceptance, TESTS-ACCEPTANCE=app-files-sharing-link

  • tests/acceptance/features/app-files-sharing-link.feature:3
  • tests/acceptance/features/app-files-sharing-link.feature:26
  • tests/acceptance/features/app-files-sharing-link.feature:40
  • tests/acceptance/features/app-files-sharing-link.feature:60
  • tests/acceptance/features/app-files-sharing-link.feature:81
  • tests/acceptance/features/app-files-sharing-link.feature:116
  • tests/acceptance/features/app-files-sharing-link.feature:128
  • tests/acceptance/features/app-files-sharing-link.feature:139
Show full log
  Scenario: open the menu in a public shared link                   # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:3
    Given I act as John                                             # ActorContext::iActAs()
    And I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I share the link for "welcome.txt"                          # FilesAppSharingContext::iShareTheLinkFor()
    And I write down the shared link                                # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                              # ActorContext::iActAs()
    And I visit the shared link I wrote down                        # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I see that the current page is the shared link I wrote down # PublicShareContext::iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown()
    And I open the Share menu                                       # PublicShareContext::iOpenTheShareMenu()
      Share menu button in Shared file page could not be found after 100 seconds (NoSuchElementException)
    Then I see that the Share menu is shown                         # PublicShareContext::iSeeThatTheShareMenuIsShown()

  Scenario: show download again in a public shared link             # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:26
    Given I act as John                                             # ActorContext::iActAs()
    And I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I share the link for "welcome.txt"                          # FilesAppSharingContext::iShareTheLinkFor()
    And I set the download of the shared link as hidden             # FilesAppSharingContext::iSetTheDownloadOfTheSharedLinkAsHidden()
    And I set the download of the shared link as shown              # FilesAppSharingContext::iSetTheDownloadOfTheSharedLinkAsShown()
    And I write down the shared link                                # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                              # ActorContext::iActAs()
    And I visit the shared link I wrote down                        # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I see that the current page is the shared link I wrote down # PublicShareContext::iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown()
    Then I see that the download button is shown                    # PublicShareContext::iSeeThatTheDownloadButtonIsShown()
      The download button is not visible yet after 100 seconds
    And I open the Share menu                                       # PublicShareContext::iOpenTheShareMenu()
    And I see that the Share menu is shown                          # PublicShareContext::iSeeThatTheShareMenuIsShown()

  Scenario: creation is not possible by default in a public shared folder # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:40
    Given I act as John                                                   # ActorContext::iActAs()
    And I am logged in                                                    # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "Shared folder"                       # FileListContext::iCreateANewFolderNamed()
    And I close the details view                                          # FilesAppContext::iCloseTheDetailsView()
    And I see that the details view is closed                             # FilesAppContext::iSeeThatTheDetailsViewIsClosed()
    And I share the link for "Shared folder"                              # FilesAppSharingContext::iShareTheLinkFor()
    And I write down the shared link                                      # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                                    # ActorContext::iActAs()
    And I visit the shared link I wrote down                              # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I see that the current page is the shared link I wrote down       # PublicShareContext::iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown()
    And I see that the file list is eventually loaded                     # FileListContext::iSeeThatTheFileListIsEventuallyLoaded()
    Then I see that it is not possible to create new files                # FileListContext::iSeeThatItIsNotPossibleToCreateNewFiles()
      Create menu button in file list could not be found (NoSuchElementException)

  Scenario: create folder in a public editable shared folder        # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:60
    Given I act as John                                             # ActorContext::iActAs()
    And I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "Editable shared folder"        # FileListContext::iCreateANewFolderNamed()
    And I close the details view                                    # FilesAppContext::iCloseTheDetailsView()
    And I see that the details view is closed                       # FilesAppContext::iSeeThatTheDetailsViewIsClosed()
    And I share the link for "Editable shared folder"               # FilesAppSharingContext::iShareTheLinkFor()
    And I set the shared link as editable                           # FilesAppSharingContext::iSetTheSharedLinkAsEditable()
    And I write down the shared link                                # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                              # ActorContext::iActAs()
    And I visit the shared link I wrote down                        # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I see that the current page is the shared link I wrote down # PublicShareContext::iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown()
    And I create a new folder named "Subfolder"                     # FileListContext::iCreateANewFolderNamed()
      Create menu button in file list could not be found after 100 seconds (NoSuchElementException)
    Then I see that the file list contains a file named "Subfolder" # FileListContext::iSeeThatTheFileListContainsAFileNamed()

  Scenario: owner sees folder created in the public page of an editable shared folder # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:81
    Given I act as John                                                               # ActorContext::iActAs()
    And I am logged in                                                                # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "Editable shared folder"                          # FileListContext::iCreateANewFolderNamed()
    And I close the details view                                                      # FilesAppContext::iCloseTheDetailsView()
    And I see that the details view is closed                                         # FilesAppContext::iSeeThatTheDetailsViewIsClosed()
    And I share the link for "Editable shared folder"                                 # FilesAppSharingContext::iShareTheLinkFor()
    And I set the shared link as editable                                             # FilesAppSharingContext::iSetTheSharedLinkAsEditable()
    And I write down the shared link                                                  # FilesAppSharingContext::iWriteDownTheSharedLink()
    And I act as Jane                                                                 # ActorContext::iActAs()
    And I visit the shared link I wrote down                                          # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I see that the current page is the shared link I wrote down                   # PublicShareContext::iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown()
    And I create a new folder named "Subfolder"                                       # FileListContext::iCreateANewFolderNamed()
      Create menu button in file list could not be found after 100 seconds (NoSuchElementException)
    And I see that the file list contains a file named "Subfolder"                    # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    When I act as John                                                                # ActorContext::iActAs()
    And I enter in the folder named "Editable shared folder"                          # FileListContext::iEnterInTheFolderNamed()
    Then I see that the file list contains a file named "Subfolder"                   # FileListContext::iSeeThatTheFileListContainsAFileNamed()

  Scenario: access a shared link protected by password with a valid password                   # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:116
    Given I act as John                                                                        # ActorContext::iActAs()
    And I am logged in                                                                         # LoginPageContext::iAmLoggedIn()
    And I share the link for "welcome.txt" protected by the password "abcdef"                  # FilesAppSharingContext::iShareTheLinkForProtectedByThePassword()
    And I write down the shared link                                                           # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                                                         # ActorContext::iActAs()
    And I visit the shared link I wrote down                                                   # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I see that the current page is the Authenticate page for the shared link I wrote down  # PublicShareContext::iSeeThatTheCurrentPageIsTheAuthenticatePageForTheSharedLinkIWroteDown()
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'http://acceptance-app-files-sharing-link/index.php/s/kPXo8keH7ijL8gW/authenticate/showShare'
      +'http://acceptance-app-files-sharing-link/index.php/s/kPXo8keH7ijL8gW'
    And I authenticate with password "abcdef"                                                  # PublicShareContext::iAuthenticateWithPassword()
    Then I see that the current page is the shared link I wrote down                           # PublicShareContext::iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown()
    And I see that the shared file preview shows the text "Welcome to your Nextcloud account!" # PublicShareContext::iSeeThatTheSharedFilePreviewShowsTheText()

  Scenario: access a shared link protected by password with an invalid password                # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:128
    Given I act as John                                                                        # ActorContext::iActAs()
    And I am logged in                                                                         # LoginPageContext::iAmLoggedIn()
    And I share the link for "welcome.txt" protected by the password "abcdef"                  # FilesAppSharingContext::iShareTheLinkForProtectedByThePassword()
    And I write down the shared link                                                           # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                                                         # ActorContext::iActAs()
    And I visit the shared link I wrote down                                                   # PublicShareContext::iVisitTheSharedLinkIWroteDown()
    And I authenticate with password "fedcba"                                                  # PublicShareContext::iAuthenticateWithPassword()
      Password field in Authenticate page could not be found after 100 seconds (NoSuchElementException)
    Then I see that the current page is the Authenticate page for the shared link I wrote down # PublicShareContext::iSeeThatTheCurrentPageIsTheAuthenticatePageForTheSharedLinkIWroteDown()
    And I see that a wrong password for the shared file message is shown                       # PublicShareContext::iSeeThatAWrongPasswordForTheSharedFileMessageIsShown()

  Scenario: access a direct download shared link protected by password with a valid password                  # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-sharing-link.feature:139
    Given I act as John                                                                                       # ActorContext::iActAs()
    And I am logged in                                                                                        # LoginPageContext::iAmLoggedIn()
    And I share the link for "welcome.txt" protected by the password "abcdef"                                 # FilesAppSharingContext::iShareTheLinkForProtectedByThePassword()
    And I write down the shared link                                                                          # FilesAppSharingContext::iWriteDownTheSharedLink()
    When I act as Jane                                                                                        # ActorContext::iActAs()
    And I visit the direct download shared link I wrote down                                                  # PublicShareContext::iVisitTheDirectDownloadSharedLinkIWroteDown()
    And I see that the current page is the Authenticate page for the direct download shared link I wrote down # PublicShareContext::iSeeThatTheCurrentPageIsTheAuthenticatePageForTheDirectDownloadSharedLinkIWroteDown()
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'http://acceptance-app-files-sharing-link/index.php/s/5RwYdTNMdez6QTi/authenticate/downloadShare'
      +'http://acceptance-app-files-sharing-link/index.php/s/5RwYdTNMdez6QTi/download'
    And I authenticate with password "abcdef"                                                                 # PublicShareContext::iAuthenticateWithPassword()
    And I see that the current page is the Authenticate page for the direct download shared link I wrote down # PublicShareContext::iSeeThatTheCurrentPageIsTheAuthenticatePageForTheDirectDownloadSharedLinkIWroteDown()

TESTS=acceptance, TESTS-ACCEPTANCE=login

  • tests/acceptance/features/login.feature:15
Show full log
  Scenario: log in with valid user and invalid password once fixed by admin # /drone/src/github.com/nextcloud/server/tests/acceptance/features/login.feature:15
    Given I act as John                                                     # ActorContext::iActAs()
    And I can not log in with user user0 and password 654231                # LoginPageContext::iCanNotLogInWithUserAndPassword()
    When I act as Jane                                                      # ActorContext::iActAs()
    And I am logged in as the admin                                         # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                            # SettingsMenuContext::iOpenTheUserSettings()
    And I set the password for user0 to 654321                              # UsersSettingsContext::iSetTheFieldForUserTo()
    And I act as John                                                       # ActorContext::iActAs()
    And I log in with user user0 and password 654321                        # LoginPageContext::iLogInWithUserAndPassword()
    Then I see that the current page is the Files app                       # FilesAppContext::iSeeThatTheCurrentPageIsTheFilesApp()
      Failed asserting that 'http://acceptance-login/index.php/login?user=user0' starts with "http://acceptance-login/index.php/apps/files/".

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.

Code looks good, tested and works 👍

@MorrisJobke MorrisJobke mentioned this pull request Mar 6, 2019
9 tasks
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Lets do this

@MorrisJobke MorrisJobke merged commit ec5f420 into master Mar 8, 2019
@MorrisJobke MorrisJobke deleted the bugfix/noid/avoid-duplicate-container-creation branch March 8, 2019 09:31
@leonklingele-work
Copy link

leonklingele-work commented Mar 11, 2019

This patch breaks the Share file by link feature. Steps to reproduce:

  1. Share a file from the files app (/apps/files)
  2. Try to access the shared file from an incognito browser window
  3. Get a File not found error

@leonklingele-work
Copy link

Will this and all other relevant patches which are required to fix regressions be backported to 15 and 14?

@nickvergessen
Copy link
Member Author

14 is running out of support pretty soon

And as for 15, I'm not sure, since it might require work by other apps to fix stuff too.

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

Successfully merging this pull request may close these issues.

None yet

4 participants