Skip to content

(PUP-10640) make tests more reliable#8351

Merged
joshcooper merged 1 commit intopuppetlabs:masterfrom
gimmyxd:maint/update_tests
Oct 2, 2020
Merged

(PUP-10640) make tests more reliable#8351
joshcooper merged 1 commit intopuppetlabs:masterfrom
gimmyxd:maint/update_tests

Conversation

@gimmyxd
Copy link
Copy Markdown
Contributor

@gimmyxd gimmyxd commented Oct 1, 2020

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

@gimmyxd
Copy link
Copy Markdown
Contributor Author

gimmyxd commented Oct 1, 2020

Travis is failing due to Facter detecting travis as AWS due to puppetlabs/facter#2095

@gimmyxd gimmyxd closed this Oct 1, 2020
@gimmyxd gimmyxd reopened this Oct 1, 2020
@puppetcla
Copy link
Copy Markdown

CLA signed by all contributors.

Comment thread spec/unit/file_system_spec.rb Outdated
@gimmyxd gimmyxd force-pushed the maint/update_tests branch 2 times, most recently from 36251a4 to ab01db2 Compare October 2, 2020 08:22
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
@gimmyxd gimmyxd force-pushed the maint/update_tests branch from ab01db2 to 38217fb Compare October 2, 2020 10:39
Copy link
Copy Markdown
Contributor

@ciprianbadescu ciprianbadescu left a comment

Choose a reason for hiding this comment

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

ok to merge, cosmetic change may be usefull

Comment thread spec/integration/util/windows/adsi_spec.rb Outdated
@joshcooper joshcooper merged commit 83652cd into puppetlabs:master Oct 2, 2020
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.

4 participants