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

Creating external storage test scenario fails with Oracle as database #37961

Open
phil-davis opened this issue Sep 30, 2020 · 0 comments
Open
Labels

Comments

@phil-davis
Copy link
Contributor

Steps to reproduce

  1. run cliExternalStorage/filesExternalWebdavOwncloud.feature test scenarios with Oracle database

Expected behaviour

Tests pass

Actual behaviour

See test PR #37952

Some real-looking failures: https://drone.owncloud.com/owncloud/core/27033/109/18

  Background:                                                                            # /drone/src/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature:8
    Given using server "REMOTE"                                                          # FeatureContext::usingServer()
    And user "Alice" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    And user "Alice" has created folder "TestMnt"                                        # FeatureContext::userHasCreatedFolder()
    And using server "LOCAL"                                                             # FeatureContext::usingServer()

  Scenario: creating a webdav_owncloud external storage                                                                              # /drone/src/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature:14
    When the administrator creates an external mount point with the following configuration about user "Alice" using the occ command # OccContext::createExternalMountPointUsingTheOccCommand()
      | host                   | %remote_server%    |
      | root                   | TestMnt            |
      | secure                 | false              |
      | user                   | %username%         |
      | password               | %password%         |
      | storage_backend        | owncloud           |
      | mount_point            | TestMountPoint     |
      | authentication_backend | password::password |
    And the administrator verifies the mount configuration for local storage "TestMountPoint" using the occ command                  # OccContext::theAdministratorVerifiesTheMountConfigurationForLocalStorageUsingTheOccCommand()
    Then the following mount configuration information should be listed:                                                             # OccContext::theFollowingInformationShouldBeListed()
      | status | code | message |
      | ok     | 0    |         |
      OccContext::theFollowingInformationShouldBeListed 'ok, 0, ' was expected to be listed, but is not listed in the mount configuration information
      Failed asserting that two arrays are equal.
      --- Expected
      +++ Actual
      @@ @@
       Array (
      -    'status' => 'ok'
      -    'code' => '0'
      -    'message' => ''
      +    'status' => 'error'
      +    'code' => '1'
      +    'message' => 'InvalidArgumentException'
       )
    And as "admin" folder "TestMountPoint" should exist                                                                              # FeatureContext::asFileOrFolderShouldExist()

  @skipOnEncryption @issue-encryption-181
  Scenario: using webdav_owncloud as external storage                                                                                     # /drone/src/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature:31
    Given the administrator has created an external mount point with the following configuration about user "Alice" using the occ command # OccContext::adminHasCreatedAnExternalMountPointWithFollowingConfigUsingTheOccCommand()
      | host                   | %remote_server%    |
      | root                   | TestMnt            |
      | secure                 | false              |
      | user                   | %username%         |
      | password               | %password%         |
      | storage_backend        | owncloud           |
      | mount_point            | TestMountPoint     |
      | authentication_backend | password::password |
      The command was not successful, exit code was 1.
      stdOut was: ''
      stdErr was: '
      In AbstractOracleDriver.php line 49:
                                                                                     
        An exception occurred while executing 'INSERT INTO "oc_external_config" ("m  
        ount_id","key","value") SELECT ?,?,? FROM "oc_external_config" WHERE "mount  
        _id" = ? AND "key" = ? HAVING COUNT(*) = 0' with params [2, "secure", false  
        , 2, "secure"]:                                                              
                                                                                     
        ORA-01400: cannot insert NULL into ("AUTOTEST"."oc_external_config"."value"  
        )                                                                            
                                                                                     
      
      In OCI8Exception.php line 23:
                                                                                     
        ORA-01400: cannot insert NULL into ("AUTOTEST"."oc_external_config"."value"  
        )                                                                            
                                                                                     
      
      files_external:create [--user [USER]] [-c|--config CONFIG] [--dry] [--output [OUTPUT]] [--] <mount_point> <storage_backend> <authentication_backend>
      
      '
       (Exception)
    When user "admin" has uploaded file with content "Hello from Local!" to "TestMountPoint/test.txt"                                     # FeatureContext::userHasUploadedAFileWithContentTo()
    And using server "REMOTE"                                                                                                             # FeatureContext::usingServer()
    Then as "Alice" file "/TestMnt/test.txt" should exist                                                                                 # FeatureContext::asFileOrFolderShouldExist()
    And the content of file "/TestMnt/test.txt" for user "Alice" should be "Hello from Local!"                                            # FeatureContext::contentOfFileForUserShouldBe()

Server configuration

Operating system:
Ubuntu

Web server:
Apache

Database:
Oracle

PHP version:
PHP 7.4
ownCloud version: (see ownCloud admin page)
Current owncloud/core master

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

No branches or pull requests

1 participant