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] Add new env variable to specify the wait times between uploads and deletes #38929

Merged
merged 3 commits into from
Jul 1, 2021

Conversation

dpakach
Copy link
Contributor

@dpakach dpakach commented Jul 1, 2021

Description

Introduce a new env variable UPLOAD_DELETE_WAIT_TIME for tests so that we can specify the wait times between uploads and deletes..

Related Issue

Motivation and Context

Ocis doesn't requires to wait between uploads for some storage drivers so we do need to be able to set this value for testind different servers.

How Has This Been Tested?

🤖

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiProxySmoke-8-6-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/30919/176/1

@phil-davis
Copy link
Contributor

boom Acceptance tests pipeline apiProxySmoke-8-6-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/30919/176/1

That's good - without the 1-second UPLOAD_DELETE_WAIT_TIME there are some test scenarios that fail on ownCloud10:

  Scenario: delete multiple files from the trashbin and make sure the correct ones are gone                                 # /drone/src/tests/acceptance/features/apiTrashbin/trashbinDelete.feature:49
    Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/textfile0.txt"                           # FeatureContext::userHasUploadedAFileTo()
    And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/child.txt"                                 # FeatureContext::userHasUploadedAFileTo()
    And user "Alice" has deleted file "/textfile0.txt"                                                                      # FeatureContext::userHasDeletedFile()
    And user "Alice" has deleted file "/textfile1.txt"                                                                      # FeatureContext::userHasDeletedFile()
    And user "Alice" has deleted file "/PARENT/parent.txt"                                                                  # FeatureContext::userHasDeletedFile()
    And user "Alice" has deleted file "/PARENT/child.txt"                                                                   # FeatureContext::userHasDeletedFile()
    And user "Alice" has deleted file "/PARENT/textfile0.txt"                                                               # FeatureContext::userHasDeletedFile()
    And user "Alice" has deleted file "/PARENT/CHILD/child.txt"                                                             # FeatureContext::userHasDeletedFile()
    When user "Alice" deletes the file with original path "/PARENT/textfile0.txt" from the trashbin using the trashbin API  # TrashbinContext::deleteFileFromTrashbin()
    And user "Alice" deletes the file with original path "/PARENT/CHILD/child.txt" from the trashbin using the trashbin API # TrashbinContext::deleteFileFromTrashbin()
      Expected to delete exactly one item from the trashbin but 0 were deleted
      Failed asserting that 0 matches expected 1.

We expect that to happen.

The next commit has export UPLOAD_DELETE_WAIT_TIME=1 for the ownCloud10 case, so CI should pass with that.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 1, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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.

3 participants