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

Correct addGroup.feature and add new text cases to other group tests #31322

Merged
merged 1 commit into from
May 1, 2018

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented May 1, 2018

Description

  1. Fix error in column name in addGroup.feature - group-id -> group_id
  2. URL-encode the group name when testing to see if a group exists - this allows groupExists() to correctly test for groups that have unusual characters in their name.
  3. Remove test cases for groups that have slash in their name - fix for those will be in another PR
  4. Add test cases for other # ? % in group names to all the places where groups are manipulated - addToGroup deleteGroup removeFromGroup - for both API v1 and v2

Now we have a full range of test cases for group names that do work properly with the existing Provisioning API v1 and v2. This will help to ensure there are no regressions when we fix the "slash in group name" case.

Motivation and Context

I wondered why the addGroup.feature test cases for group names containing a slash were passing. Because actually there is a problem with that - see issue #31015 and PR #31017

I discovered that there was a typo in the column name of the examples table. Actually the scenario outline was running over-and-over and repeatedly testing adding a group with the literal name <group_id> instead of substituting in the group id in each example table row.

When I make that fix, then a lot of the group creations fail, because the group should be URL-encoded when the group name needs to be sent in the URL (e.g. when checking if the group exists).

After fixing that, I still have to remove the entries from the examples table that have a slash in the group name, because those really do fail. The other PR addresses fixing that problem.

How Has This Been Tested?

Local acceptance test runs of group tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Acceptance test fixes

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@phil-davis
Copy link
Contributor Author

Backport stable10 #31323

@phil-davis phil-davis mentioned this pull request May 1, 2018
10 tasks
@codecov
Copy link

codecov bot commented May 1, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #31322   +/-   ##
=========================================
  Coverage     62.59%   62.59%           
  Complexity    18227    18227           
=========================================
  Files          1145     1145           
  Lines         68414    68414           
  Branches       1234     1234           
=========================================
  Hits          42821    42821           
  Misses        25232    25232           
  Partials        361      361
Flag Coverage Δ Complexity Δ
#javascript 52.05% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.79% <ø> (ø) 18227 <ø> (ø) ⬇️

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 992b5dc...f519122. Read the comment docs.

@phil-davis phil-davis merged commit 2a40547 into master May 1, 2018
@phil-davis phil-davis deleted the api-tests-enhance-group-manipulation-code branch May 1, 2018 10:21
@PVince81 PVince81 modified the milestones: development, QA Jun 13, 2018
@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants