Skip to content

Conversation

@fretb
Copy link
Contributor

@fretb fretb commented Oct 3, 2022

Description

d4c3b8a introduced a bug making compare_user on Linux systems return %i{expire_date inactive} instead of wether @change_desc is empty.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@fretb fretb requested review from a team as code owners October 3, 2022 07:39
@fretb fretb force-pushed the bug/linux-user-compare branch from fdd9186 to 5bbc061 Compare October 3, 2022 07:47
@Stromweld
Copy link
Contributor

@marcparadise @jaymzh This looks like it should fix the user resource for subsequent runs failing with calling usermod with no flags. Also see community slack for more information if needed https://chefcommunity.slack.com/archives/C55FCUGBS/p1664542267513479.

Copy link
Member

@marcparadise marcparadise left a comment

Choose a reason for hiding this comment

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

Thanks for this, this is a good catch!

I have put one request inline; separately in the spirit of 'if we had tested this function earlier, this would have been caught sooner' - can you add unit (and ideally functional) test cases to cover this?

@fretb fretb force-pushed the bug/linux-user-compare branch from 5bbc061 to 1ed4089 Compare October 4, 2022 11:01
@fretb
Copy link
Contributor Author

fretb commented Oct 4, 2022

Thanks for this, this is a good catch!

I have put one request inline; separately in the spirit of 'if we had tested this function earlier, this would have been caught sooner' - can you add unit (and ideally functional) test cases to cover this?

Hi, I would love to add a functional test, but I don't have experience in this matter. I'll see what I can do. As I view it, there should be a linux_user_spec.rb alongside mac and windows in spec/functional/resource/user?

@marcparadise
Copy link
Member

@tpowell-progress can help out with this

@marcparadise
Copy link
Member

The current openSUSE build failure is a related to the build container at first glance, and not this PR.

Copy link
Collaborator

@jaymzh jaymzh left a comment

Choose a reason for hiding this comment

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

nice catch. Though I agree, tests would be good.

Copy link
Collaborator

@jaymzh jaymzh left a comment

Choose a reason for hiding this comment

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

Revoking approval, b/c tests

@fretb fretb force-pushed the bug/linux-user-compare branch 9 times, most recently from a0928c2 to cf80d39 Compare October 6, 2022 09:20
@fretb fretb requested review from jaymzh and marcparadise and removed request for jaymzh October 6, 2022 16:27
d4c3b8a introduced a bug making
`compare_user` on Linux systems return `%i{expire_date inactive}`
instead of wether `@change_desc` is empty.

Signed-off-by: Frederik Thuysbaert <frederik.thuysbaert@combell.group>
@fretb fretb force-pushed the bug/linux-user-compare branch from cf80d39 to f4fab1f Compare October 7, 2022 08:15
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

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

@tpowell-progress tpowell-progress self-assigned this Oct 11, 2022
@fretb fretb removed the request for review from marcparadise October 12, 2022 08:18
@fretb fretb requested a review from jaymzh October 12, 2022 08:18
Copy link
Contributor

@tpowell-progress tpowell-progress left a comment

Choose a reason for hiding this comment

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

@fretb I see you have written tests. Nice work!

Apologies for the delay in circling back... build issues and internet outages.

@tpowell-progress tpowell-progress added the Status: Waiting on Release Ready to merge, but waiting on cutting a release label Oct 12, 2022
@tpowell-progress tpowell-progress merged commit c7b2dad into chef:main Oct 14, 2022
@fretb fretb deleted the bug/linux-user-compare branch October 14, 2022 20:08
@tpowell-progress tpowell-progress removed the Status: Waiting on Release Ready to merge, but waiting on cutting a release label Oct 17, 2022
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.

6 participants