(PUP-10640) make tests more reliable#8351
Merged
joshcooper merged 1 commit intopuppetlabs:masterfrom Oct 2, 2020
Merged
Conversation
This was referenced Oct 1, 2020
Contributor
Author
|
Travis is failing due to Facter detecting travis as AWS due to puppetlabs/facter#2095 |
|
CLA signed by all contributors. |
joshcooper
reviewed
Oct 1, 2020
36251a4 to
ab01db2
Compare
the following tests have been updated - spec/integration/util/windows/adsi_spec.rb:34 Was making the assumption that `Administrator` user is present. Changed to `Guest` since `Administrator` is not available in all setups. - spec/unit/file_system_spec.rb:870 `Puppet::FileSystem.expand_path` expands relative to the drive that Puppet is executed from. The expect here was making the assumption that Puppet tests are run form `SystemDrive` which is not always the case. Updated the test to match that the expanded path starts with a drive letter. - spec/unit/provider/exec_spec.rb ENV['PATH'] is not correctly handled by Ruby. Use Pathname.cleanpath no normalize the path that is used in the `exec` resource
ab01db2 to
38217fb
Compare
ciprianbadescu
approved these changes
Oct 2, 2020
Contributor
ciprianbadescu
left a comment
There was a problem hiding this comment.
ok to merge, cosmetic change may be usefull
joshcooper
approved these changes
Oct 2, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the following tests have been updated
spec/integration/util/windows/adsi_spec.rb:34
Was making the assumption that
Administratoruseris present. Changed to
GuestsinceAdministratoris not available in all setups.
spec/unit/file_system_spec.rb:870
Puppet::FileSystem.expand_pathexpands relativeto the drive that Puppet is executed from. The
expect here was making the assumption that Puppet
tests are run form
SystemDrivewhich is not alwaysthe case. Updated the test to match that the expanded path
starts with a drive letter.
spec/unit/provider/exec_spec.rb
ENV['PATH'] is not correctly handled by Ruby. Use
Pathname.cleanpath no normalize the path that is
used in the
execresource