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

in core webDav API tests adjust scenarios where w direct WebDAV URL is given #36

Closed
individual-it opened this issue Jan 27, 2020 · 10 comments
Assignees
Labels

Comments

@individual-it
Copy link
Member

where ever an WebDAV URL is given in the feature files the test need to be checked if its applicable for OCIS and if yes the feature needs to be made flexible, so that it works with oc10 and OCIS

@DeepDiver1975
Copy link
Member

we will have a dedicated repo for the services ocis-dav and ocis-ocs - we need to move this issue there. one day ....

@individual-it
Copy link
Member Author

should be fixed by #77, the dav URLs should be now the same in ocis and oC10

@PVince81
Copy link
Contributor

reopening to enable the matching test

@PVince81 PVince81 reopened this Apr 30, 2020
@PVince81 PVince81 self-assigned this Apr 30, 2020
@PVince81
Copy link
Contributor

the tests in question:

tests/acceptance/features/apiWebdavProperties/getFileProperties.feature|165| @skipOnOcis @issue-ocis-reva-36
tests/acceptance/features/apiWebdavProperties/getFileProperties.feature|190| @skipOnOcis @issue-ocis-reva-36
tests/acceptance/features/apiAuthWebDav/webDavMKCOLAuth.feature|32| @skipOnOcis @issue-ocis-reva-36
tests/acceptance/features/apiAuthWebDav/webDavMKCOLAuth.feature|40| @skipOnOcV10 @issue-ocis-reva-36

the webDavMKCOLAuth ones can be enabled, they pass for me locally.

however the other two above don't even run when using the behat tags recommended by the docs. If I remove all tags from the behat filters it fails with authentication issues, not sure if it's a local env issue or a test problem:

% make test-acceptance-api \
TEST_SERVER_URL=http://localhost:9140 \
TEST_EXTERNAL_USER_BACKENDS=true \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
BEHAT_FILTER_TAGS='@issue-ocis-reva-36' tests/acceptance/features/apiWebdavProperties/getFileProperties.feature
composer install
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.                                                                                                                                 
Generating optimized autoload files
Composer cleaner: Removed 5 files or directories.
composer bin behat install --no-progress
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 zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Package zendframework/zend-ldap is abandoned, you should avoid using it. Use laminas/laminas-ldap instead.
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
./tests/acceptance/run.sh --type api
Script path: /home/vincent/Private/Work/workspace/owncloud/tests/acceptance
Not using php inbuilt server for running scenario ...
Updating .htaccess for proper rewrites


Running all API tests tagged ~@skipOnOcV&&~@skipOnOcV&&~@skipOnOcV&&@issue-ocis-reva-36&&@api&&~@skip 
@api @TestAlsoOnExternalUserBackend
Feature: get file properties
  As a user
  I want to be able to get meta-information about files
  So that I can know file meta-information (detailed requirement TBD)

  Background:                                                                    # /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:7                                                                                         
    Given using OCS API version "1"                                              # FeatureContext::usingOcsApiVersion()
    And user "user0" has been created with default attributes and skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributes()                                                                                                                                  

  @skipOnOcis @issue-ocis-reva-36
  Scenario Outline: Doing a PROPFIND with a web login should work with CSRF token on the new backend  # /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:166                                                                  
    Given using <dav_version> DAV path                                                                # FeatureContext::usingOldOrNewDavPath()                                                                                                                                
    And user "user0" has logged in to a web-style session                                             # FeatureContext::userHasLoggedInToAWebStyleSessionUsingTheAPI()                                                                                                        
    When the client sends a "PROPFIND" to "/remote.php/dav/files/user0/welcome.txt" with requesttoken # FeatureContext::sendingAToWithRequesttoken()                                                                                                                          
    Then the HTTP status code should be "207"                                                         # FeatureContext::thenTheHTTPStatusCodeShouldBe()                                                                                                                       

    Examples:
      | dav_version |
      | old         |
        The HTTP status code 401 is not between 200 and 299
        Failed asserting that 401 is equal to 299 or is less than 299.
      | new         |
        The HTTP status code 401 is not between 200 and 299
        Failed asserting that 401 is equal to 299 or is less than 299.

  @skipOnOcis @issue-ocis-reva-36
  Scenario Outline: Do a PROPFIND to a non-existing URL                                                       # /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:191
    And user "user0" requests "<url>" with "PROPFIND" using basic auth                                        # AuthContext::userRequestsURLWithUsingBasicAuth()
    Then the value of the item "/d:error/s:message" in the response should be "<message>"                     # WebDavPropertiesContext::assertValueOfItemInResponseIs()
    And the value of the item "/d:error/s:exception" in the response should be "Sabre\DAV\Exception\NotFound" # WebDavPropertiesContext::assertValueOfItemInResponseIs()

    Examples:
      | url                                  | message                                      |
      | /remote.php/dav/files/does-not-exist | Principal with name does-not-exist not found |
        String could not be parsed as XML (Exception)
      | /remote.php/dav/does-not-exist       | File not found: does-not-exist in 'root'     |
        String could not be parsed as XML (Exception)

--- Failed scenarios:

    /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:173
    /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:174
    /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:197
    /srv/www/htdocs/owncloud/tests/acceptance/features/apiWebdavProperties/getFileProperties.feature:198

4 scenarios (4 failed)
22 steps (12 passed, 4 failed, 6 skipped)
0m4.71s (19.63Mb)

@individual-it

@individual-it
Copy link
Member Author

individual-it commented May 4, 2020

part of the tests in getFilesProperties have been tagged wrongly, they fail because the body is empty

@individual-it
Copy link
Member Author

individual-it commented May 4, 2020

@individual-it
Copy link
Member Author

individual-it commented May 4, 2020

@PVince81
Copy link
Contributor

PVince81 commented May 4, 2020

  • re-check after the above are all merged

@PVince81
Copy link
Contributor

PVince81 commented May 7, 2020

hmmm, now I'm confused. We don't have any tests tagged as "ocis-issue-36" any more.

is the issue now resolved or do we need new tests to demonstrate this ?
@individual-it please clarify or close if resolved

@individual-it
Copy link
Member Author

this is not a bug in ocis, but has been a problem in the test-infrastructure. So if all are merged and no test are left skipped because of this issue, we can close it

@PVince81 PVince81 closed this as completed May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants