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] edit users only when running with oc10 backend #38138

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

dpakach
Copy link
Contributor

@dpakach dpakach commented Nov 24, 2020

Description

For acceptance tests when we create users, we send separate requests to set user's email and displayname after the user is created. This is because in oc10 we cannot create user with email, displayname set. but this is possible in ocis
So we can remove sending separate requests when running tests in ocis.
CI in ocis passes https://drone.owncloud.com/owncloud/ocis/1683

Related Issue

Motivation and Context

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

@sonarcloud
Copy link

sonarcloud bot commented Nov 24, 2020

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

@dpakach dpakach requested review from individual-it and phil-davis and removed request for individual-it November 24, 2020 10:04
@dpakach dpakach self-assigned this Nov 24, 2020
@dpakach dpakach marked this pull request as ready for review November 24, 2020 10:05
@@ -924,6 +924,7 @@ public function usersHaveBeenCreated(
} else {
$attributesToCreateUser['userid'] = $userAttributes['userid'];
$attributesToCreateUser['password'] = $userAttributes['password'];
$attributesToCreateUser['displayname'] = $userAttributes['displayName'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Everything that calls usersHaveBeenCreated is passing in $userAttributes['displayName'] - so it is always set, but possibly sometimes to null. I guess that is OK. The request to the "add user" endpoint might go out asking for displayname = null - probable it will be requesting the empty string, or guzzle will ignore that item in the body and not send it at all. On oC10 it does not matter - it ignores a displayname in the "add user" request. On OCIS we might find out what happens if the request explicitly asks for an empty displayname

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.

check if editing a created user in the API tests is needed when testing OCIS
2 participants