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

fix fixtures_symlinks on Windows default tempdir #167

Merged
merged 2 commits into from
Apr 5, 2018

Conversation

tabakhase
Copy link
Contributor

use junction/mklink on windows to allow selfcontaining links
Fixes #97

FileUtils::ln_s works on win, but only if the result is non-recursive?

given repol location C:/dev/control - via git bash (MSYS@win10) tempdir:

  • ./.onceover (default) fails
  • C:/dev/control/.onceover fails
  • ./dummy/.onceover fails
  • C:/dev/control/dummy/.onceover fails
  • ../controll.onceover works

When "using windows tools" the default ./.onceover can be made workable.

Credits to gems/puppetlabs_spec_helper-2.6.2/lib/puppetlabs_spec_helper/rake_tasks.rb 😄


turns

DEBUG    -> Symlinking /dev/control/.onceover/etc/puppetlabs/code/environments/production/modules/apache to C:/dev/control/.onceover/spec/fixtures/modules/apache
rake aborted!
Errno::EACCES: Permission denied @ rb_file_s_symlink - (/dev/control/.onceover/etc/puppetlabs/code/environments/production/modules/apache, C:/dev/control/.onceover/spec/fixtures/modules/apache)
C:/dev/control/Rakefile:165:in `block in <top (required)>'

into

DEBUG    -> Symlinking /dev/control/.onceover/etc/puppetlabs/code/environments/production/modules/xinetd to C:/dev/control/.onceover/spec/fixtures/modules/xinetd
DEBUG    -> Running bundle exec rake spec_standalone from C:/dev/control/.onceover
[...] 
Finished in 2.92 seconds (files took 3.41 seconds to load)
20 examples, 0 failures

use junction/mklink on windows to allow selfcontaining links
@dylanratcliffe
Copy link
Collaborator

@tabakhase This looks great, will merge once all tests pass

@dylanratcliffe dylanratcliffe merged commit 2e90f21 into voxpupuli:master Apr 5, 2018
@dylanratcliffe
Copy link
Collaborator

Released in v3.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Path error on run spec
2 participants