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

DXCDT-409: Users commands integration tests #686

Merged
merged 11 commits into from
Mar 30, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Mar 28, 2023

🔧 Changes

A modest increase in testing coverage for the users commands. A couple new commands covered, but otherwise just some edge cases. Unfortunately, the auth0 users import command is not testable, there is a bug that prevents the --no-input flag from working as expected, requires additional input.

Also included in this PR is a bug fix that previously prevented passwords from being updated.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner March 28, 2023 21:34
@willvedd willvedd marked this pull request as draft March 28, 2023 21:57
@willvedd willvedd marked this pull request as ready for review March 30, 2023 12:34
Comment on lines +463 to +467
if len(inputs.Email) != 0 {
user.Email = &inputs.Email
}

if len(inputs.Password) == 0 {
user.Password = current.Password
} else {
if len(inputs.Password) != 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes a bug where password would not be able to be update because you cannot update both email and password simultaneously.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 66.66% and project coverage change: +0.36 🎉

Comparison is base (473536b) 55.99% compared to head (729818e) 56.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #686      +/-   ##
==========================================
+ Coverage   55.99%   56.36%   +0.36%     
==========================================
  Files          89       89              
  Lines       11506    11502       -4     
==========================================
+ Hits         6443     6483      +40     
+ Misses       4622     4580      -42     
+ Partials      441      439       -2     
Impacted Files Coverage Δ
internal/cli/organizations.go 73.39% <0.00%> (ø)
internal/cli/users.go 69.14% <100.00%> (+3.41%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@willvedd willvedd enabled auto-merge (squash) March 30, 2023 14:28
@willvedd willvedd merged commit 2d5566d into main Mar 30, 2023
@willvedd willvedd deleted the DXCDT-409-users-integration-tests branch March 30, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants