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 user roles in API acceptance tests #37377

Merged
merged 3 commits into from
May 14, 2020

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented May 12, 2020

Description

Adjusts acceptance test scenarios so that the "standard" usernames are used in a standard way:

  • tests that have just a single ordinary user use user0
  • sharing tests have user0 share to user1
  • resharing tests then have user resharing to user2 ...
  • tests that create and test an extra admin account use another-admin or a subadmin use subadmin another-subadmin
  • tests that create and modify attributes of an ordinary account use brand-new-user then another-new-user and similar for groups brand-new-group and another-new-group (e.g. Provisioning API tests) (names subject to change!)
  • tests that check API calls to a non-existent user use nonexistentuser and for groups nonexistentgroup

The "primary actor" in most scenarios is either admin or user0

This will make it easier to choose substitute usernames (UIDs) and be confident that all the test scenarios are being run in some sensible way with the substitutions.

This PR has changes for test suites apiAuth through to apiShareManagementBasic.

Related Issue

#33596

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 May 12, 2020
@phil-davis phil-davis changed the title [Tests-Only] [WIP] Adjust user roles in API acceptance tests (1) [Tests-Only] [WIP] Adjust user roles in API acceptance tests May 12, 2020
@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #37377 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #37377   +/-   ##
=========================================
  Coverage     64.57%   64.57%           
  Complexity    19220    19220           
=========================================
  Files          1268     1268           
  Lines         75105    75105           
  Branches       1331     1331           
=========================================
  Hits          48496    48496           
  Misses        26217    26217           
  Partials        392      392           
Flag Coverage Δ Complexity Δ
#javascript 54.14% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.72% <ø> (ø) 19220.00 <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5301af6...f1816bd. Read the comment docs.

@phil-davis phil-davis force-pushed the adjust-user-roles-in-acceptance-tests branch 5 times, most recently from 26f02fd to 5bc1263 Compare May 14, 2020 05:08
@phil-davis phil-davis force-pushed the adjust-user-roles-in-acceptance-tests branch from efdff15 to f1816bd Compare May 14, 2020 08:07
@phil-davis phil-davis requested a review from individual-it May 14, 2020 11:00
@phil-davis phil-davis changed the title [Tests-Only] [WIP] Adjust user roles in API acceptance tests [Tests-Only] Adjust user roles in API acceptance tests May 14, 2020
@phil-davis phil-davis marked this pull request as ready for review May 14, 2020 11:02
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.

looks good, but please make a PR to ocis & ocis-reva with this branch as test-runner to prove that it works there

Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the display name returned by the API should be "New User"
And the quota definition returned by the API should be "default"

Scenario: a normal user gets their own information, providing uppercase username as authentication
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| newuser | New User |
When user "NEWUSER" retrieves the information of user "newuser" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The uppercase has got lost here - see issue #38014

@@ -111,9 +111,9 @@ Feature: get user
@skipOnOcV10.3
Scenario: a normal user gets their own information, providing uppercase username in the URL
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| newuser | New User |
When user "newuser" retrieves the information of user "NEWUSER" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The uppercase has got lost here - see issue #38014

@@ -122,19 +122,19 @@ Feature: get user
@skipOnOcV10.3
Scenario: a mixed-case normal user gets their own information, providing lowercase username in the URL
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| NewUser | New User |
When user "NewUser" retrieves the information of user "newuser" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mixed case has got lost here - see issue #38014

Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the display name returned by the API should be "New User"
And the quota definition returned by the API should be "default"

Scenario: a mixed-case normal user gets their own information, providing the mixed-case username in the URL
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| NewUser | New User |
When user "newuser" retrieves the information of user "NewUser" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mixed case has got lost here - see issue #38014

Then the OCS status code should be "200"
And the HTTP status code should be "200"
And the display name returned by the API should be "New User"
And the quota definition returned by the API should be "default"

Scenario: a normal user gets their own information, providing uppercase username as authentication
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| newuser | New User |
When user "NEWUSER" retrieves the information of user "newuser" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The uppercase has got lost here - see issue #38014

@@ -113,9 +113,9 @@ Feature: get user
@skipOnOcV10.3
Scenario: a normal user gets their own information, providing uppercase username in the URL
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| newuser | New User |
When user "newuser" retrieves the information of user "NEWUSER" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The uppercase has got lost here - see issue #38014

@@ -124,19 +124,19 @@ Feature: get user
@skipOnOcV10.3
Scenario: a mixed-case normal user gets their own information, providing lowercase username in the URL
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| NewUser | New User |
When user "NewUser" retrieves the information of user "newuser" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mixed case has got lost here - see issue #38014

Then the OCS status code should be "200"
And the HTTP status code should be "200"
And the display name returned by the API should be "New User"
And the quota definition returned by the API should be "default"

Scenario: a mixed-case normal user gets their own information, providing the mixed-case username in the URL
Given these users have been created with default attributes and skeleton files:
| username | displayname |
| NewUser | New User |
When user "newuser" retrieves the information of user "NewUser" using the provisioning API
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mixed case has got lost here - see issue #38014

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