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] Improve skeleton upload error message #38051

Merged
merged 2 commits into from
Oct 29, 2020

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Oct 29, 2020

Description

  1. When a test run uses the "upload" method to create skeleton files for a user and something goes wrong, all we get is a message:
    https://drone.owncloud.com/owncloud/ocis/1076/21/7
  Background:                                                                          # /srv/app/testrunner/tests/acceptance/features/apiShareManagementToShares/acceptSharesToSharesFolder.feature:7
    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 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    |
      Could not upload skeleton file (Exception)

"Could not upload skeleton file" is not so helpful. We do not even know which user it was.

Add information about the user, file, status to the exception message.

  1. When a share could not be accepted, we get a message like Sharing::userHasReactedToShareOfferedBy could not accepted share to Brian by Alice

Fix it so it says "could not accept". Add the path of the share to the message, so it will be obvious exactly which share could not be accepted.

These were noticed while investigated test fails on OCIS.

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

tests/TestHelpers/OcisHelper.php Outdated Show resolved Hide resolved
@phil-davis phil-davis force-pushed the improve-skeleton-upload-error-message branch from e3f1418 to 1ad10ce Compare October 29, 2020 10:31
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.

I still have to scroll right & left to review :-(

@phil-davis
Copy link
Contributor Author

I still have to scroll right & left to review :-(

We will have to go-fund-me for a wide screen for you.

@individual-it
Copy link
Member

That would be great, but would not solve the problem, you would need to make github change their UI
image

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

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

@phil-davis phil-davis merged commit 0aa92fc into master Oct 29, 2020
@delete-merged-branch delete-merged-branch bot deleted the improve-skeleton-upload-error-message branch October 29, 2020 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants