voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
141 stars 45 forks source link

generate_fixtures does not create symlinks properly #277

Open rnelson0 opened 3 years ago

rnelson0 commented 3 years ago

When running generate_fixtures rake task, the .fixtures.yml for modules in the repo is incorrect.

Output:

fixtures:
   symlinks:
    profiles: site-modules/profiles

This resulted in a symlink that pointed to itself (some output trimmed):

C:\Users\rnelson\git\puppet> ls -l .\spec\fixtures\modules\
l----           8/17/2020  2:22 PM                profiles -> C:\Users\rnelson\git\puppet\spec\fixtures\modules\site-modules\profiles

I expected the following fixtures and symlink:

fixtures:
  symlinks:
    profiles: "#{source_dir}/site-modules/profiles"

l----           8/17/2020  2:25 PM                profiles -> C:\Users\rnelson\git\puppet\site-modules\profiles

The relative symlink created by using #{source_dir} does work properly.

I am using onceover via pdk (pdk bundle exec rake generate_fixtures) and on a Windows 10 machine. If necessary I can provide more output as needed using my ref 69e9a64743221a7a82965b4d305cc979db13a2f7.