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

[Tests-Only] Up download single file shares #1171

Closed
wants to merge 2 commits into from
Closed

[Tests-Only] Up download single file shares #1171

wants to merge 2 commits into from

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Sep 15, 2020

Get results of file download tests...

Actually interested in apiShareManagement/acceptSharesToSharesFolder.feature:15 (and similar where the downloaded file is empty)

@phil-davis
Copy link
Contributor Author

https://cloud.drone.io/cs3org/reva/2546/5/7

 Scenario: When accepting a share of a file, the received file is accessible                                                # /drone/src/tmp/testrunner/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:15
    Given the administrator has set the default folder for received shares to "Shares"                                       # OccContext::theAdministratorHasSetTheDefaultFolderForReceivedSharesTo()
    And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"                                            # AppConfigurationContext::serverParameterHasBeenSetTo()
    And user "Alice" has shared file "/textfile0.txt" with user "Brian"                                                      # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    When user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API                           # FeatureContext::userReactsToShareOfferedBy()
    Then the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()
      The downloaded content was expected to be 'ownCloud test text file 0
      ', but actually is ''. HTTP status was 404
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'ownCloud test text file 0\n
      -'
      +''

It gets a 404 - not found

@butonic
Copy link
Contributor

butonic commented Sep 15, 2020

Hm, I am testing this with ocis ...

go.mod has

replace github.com/cs3org/reva => ../reva
replace github.com/owncloud/ocis-reva => ../ocis-reva

reva uses this branch ...

and the tests like this:

✗ make test-acceptance-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
SKELETON_DIR=apps/testing/data/apiSkeleton \
BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS' \
BEHAT_FEATURE='tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature'
composer install
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlrpc.so' (tried: /usr/lib/php/modules/xmlrpc.so (/usr/lib/php/modules/xmlrpc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/xmlrpc.so.so (/usr/lib/php/modules/xmlrpc.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package patchwork/jsqueeze is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Composer cleaner: Removed 5 files or directories.
composer bin behat install --no-progress
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlrpc.so' (tried: /usr/lib/php/modules/xmlrpc.so (/usr/lib/php/modules/xmlrpc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/xmlrpc.so.so (/usr/lib/php/modules/xmlrpc.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
32 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
./tests/acceptance/run.sh --type api
Script path: /home/jfd/Repositories/core/tests/acceptance
Not using php inbuilt server for running scenario ...
Updating .htaccess for proper rewrites


Running apiShareManagement tests tagged ~@skipWhenTestingRemoteSystems&&~@skipOnOcV&&~@skipOnOcV&&~@skipOnOcV&&~@notToImplementOnOCIS&&~@toImplementOnOCIS&&@api&&~@skip
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlrpc.so' (tried: /usr/lib/php/modules/xmlrpc.so (/usr/lib/php/modules/xmlrpc.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/xmlrpc.so.so (/usr/lib/php/modules/xmlrpc.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
@api @files_sharing-app-required
Feature: accept/decline shares coming from internal users to the Shares folder
  As a user
  I want to have control of which received shares I accept
  So that I can keep my file system clean

  Background:                                                                     # /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:7
    Given using OCS API version "1"                                               # FeatureContext::usingOcsApiVersion()
    And using new DAV path                                                        # FeatureContext::usingOldOrNewDavPath()
    And these users have been created with default attributes and skeleton files: # FeatureContext::theseUsersHaveBeenCreated()
      | username |
      | Alice    |
      | Brian    |

  Scenario: When accepting a share of a file, the received file is accessible                                                # /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:15
    Given the administrator has set the default folder for received shares to "Shares"                                       # OccContext::theAdministratorHasSetTheDefaultFolderForReceivedSharesTo()
    And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"                                            # AppConfigurationContext::serverParameterHasBeenSetTo()
    And user "Alice" has shared file "/textfile0.txt" with user "Brian"                                                      # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    When user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API                           # FeatureContext::userReactsToShareOfferedBy()
    Then the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()

  Scenario: When accepting a share of a folder, the received folder is accessible                                                     # /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:22
    Given the administrator has set the default folder for received shares to "Shares"                                                # OccContext::theAdministratorHasSetTheDefaultFolderForReceivedSharesTo()
    And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"                                                     # AppConfigurationContext::serverParameterHasBeenSetTo()
    And user "Alice" has shared file "/PARENT" with user "Brian"                                                                      # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    When user "Brian" accepts share "/PARENT" offered by user "Alice" using the sharing API                                           # FeatureContext::userReactsToShareOfferedBy()
    Then the content of file "/Shares/PARENT/parent.txt" for user "Brian" should be "ownCloud test text file parent" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()

  @skipOnOcV10 @issue-37883
  Scenario: When accepting a share of a file, the response is valid                                                         # /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:30
    Given the administrator has set the default folder for received shares to "Shares"                                      # OccContext::theAdministratorHasSetTheDefaultFolderForReceivedSharesTo()
    And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"                                           # AppConfigurationContext::serverParameterHasBeenSetTo()
    And user "Alice" has shared file "/textfile0.txt" with user "Brian"                                                     # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    When user "Brian" accepts share "/textfile0.txt" offered by user "Alice" using the sharing API                          # FeatureContext::userReactsToShareOfferedBy()
    Then the OCS status code should be "100"                                                                                # OCSContext::theOCSStatusCodeShouldBe()
      OCSContext::getOCSResponseStatusCode Received empty response where XML was expected (Exception)
    And the HTTP status code should be "200"                                                                                # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the fields of the last response to user "Alice" sharing with user "Brian" should include                            # FeatureContext::checkFieldsOfLastResponseToUser()
      | share_with             | %username%            |
      | share_with_displayname | %displayname%         |
      | file_target            | /Shares/textfile0.txt |
      | path                   | /Shares/textfile0.txt |
      | permissions            | share,read,update     |
      | uid_owner              | %username%            |
      | displayname_owner      | %displayname%         |
      | item_type              | file                  |
      | mimetype               | text/plain            |
      | storage_id             | ANY_VALUE             |
      | share_type             | user                  |
    And the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()

  @skipOnOcV10 @issue-37883
  Scenario: When accepting a share of a folder, the response is valid                                                                # /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:52
    Given the administrator has set the default folder for received shares to "Shares"                                               # OccContext::theAdministratorHasSetTheDefaultFolderForReceivedSharesTo()
    And parameter "shareapi_auto_accept_share" of app "core" has been set to "no"                                                    # AppConfigurationContext::serverParameterHasBeenSetTo()
    And user "Alice" has shared file "/PARENT" with user "Brian"                                                                     # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
    When user "Brian" accepts share "/PARENT" offered by user "Alice" using the sharing API                                          # FeatureContext::userReactsToShareOfferedBy()
    Then the OCS status code should be "100"                                                                                         # OCSContext::theOCSStatusCodeShouldBe()
      OCSContext::getOCSResponseStatusCode Received empty response where XML was expected (Exception)
    And the HTTP status code should be "200"                                                                                         # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the fields of the last response to user "Alice" sharing with user "Brian" should include                                     # FeatureContext::checkFieldsOfLastResponseToUser()
      | share_with             | %username%           |
      | share_with_displayname | %displayname%        |
      | file_target            | /Shares/PARENT       |
      | path                   | /Shares/PARENT       |
      | permissions            | all                  |
      | uid_owner              | %username%           |
      | displayname_owner      | %displayname%        |
      | item_type              | folder               |
      | mimetype               | httpd/unix-directory |
      | storage_id             | ANY_VALUE            |
      | share_type             | user                 |
    And the content of file "/Shares/PARENT/parent.txt" for user "Brian" should be "ownCloud test text file parent" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()

--- Failed scenarios:

    /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:30
    /home/jfd/Repositories/core/tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature:52

4 scenarios (2 passed, 2 failed)
38 steps (30 passed, 2 failed, 6 skipped)
2m59.98s (15.60Mb)
runsh: Total 4 scenarios (2 passed, 2 failed)
runsh: Exit code of main run: 1
runsh: Total unexpected failed scenarios throughout the test run:
apiShareManagement/acceptSharesToSharesFolder.feature:30
apiShareManagement/acceptSharesToSharesFolder.feature:52
runsh: There were no unexpected success.
make: *** [Makefile:207: test-acceptance-api] Fehler 1

@phil-davis
Copy link
Contributor Author

PR #1172 bumps the core commit id to get this little bit of test code change from core.

@phil-davis
Copy link
Contributor Author

OK - it might work with ocis storage.

I was getting ocis storage CI running in #1165

I also ran litmus with ocis storage, but it got a fail. See PR #1166 - so I thought it will be good to understand that fail first, before running loads of API tests.

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

Successfully merging this pull request may close these issues.

2 participants