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] Adjust trashbinFilesFolders test setups #38658

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Apr 27, 2021

Description

PR #38541 adjusted the use of skeleton files. The files created in the Given steps need to be adjusted in some scenarios that use textfile2

Related Issue

How Has This Been Tested?

CI

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

@phil-davis phil-davis self-assigned this Apr 27, 2021
@sonarqubecloud
Copy link

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

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

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

shouldn't And user "testtrashbin101" has deleted file "/textfile2.txt" have failed before this change?

@phil-davis
Copy link
Contributor Author

phil-davis commented Apr 28, 2021

shouldn't And user "testtrashbin101" has deleted file "/textfile2.txt" have failed before this change?

The file did not exist, so maybe the given step passes because actually the file does not exist at the end of the step. The code in WebDav.php userHasDeletedFile does:

		$this->theHTTPStatusCodeShouldBe(
			["204", "404"],
			"HTTP status code was not 204 or 404 while trying to $deleteText $fileOrFolder '$entry' for user '$user'"
		);

So it passes because the file does not exist (and never existed).

Maybe we should change that in a separate PR, so that we know when a Given step tries to delete a file that is already not existing? (I am trying that in #38660

@individual-it individual-it merged commit 315226f into master Apr 28, 2021
@delete-merged-branch delete-merged-branch bot deleted the adjust-tests-from-38541 branch April 28, 2021 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants