rspec and windows symlinks

asked 2016-04-14 03:20:26 -0500

Is there any way to handle rspec symlinks in a good way on both Linux and Windows.

On Linux, this is simple. Unfortunately symlinks created on Linux do not work on Windows. Even worse, mklink, fsutil and even other workarounds do not work well without elevated admin access in Windows. Still even worse, it appears that we're running into problems even when giving symlink rights in Windows due to home catalogs residing on DFS shares. Right now, I'm forced to copy both catalogs over to spec/fixtures/modules/{module name}/ to get test runs to work. Then, when everything is checked in, code updates fail since updates to the code are not replicated over to the spec folder.

Is there a solution to this? I'm not a Ruby programmer and I haven't worked much with rspec. Perhaps a way to copy over/sync spec modules during a rake run?

edit retag flag offensive close merge delete


Do you mean Rspec as in Rspec-puppet or Serverspec?

Alex Harvey gravatar imageAlex Harvey ( 2016-04-14 04:21:40 -0500 )edit


luksi1 gravatar imageluksi1 ( 2016-04-14 04:45:02 -0500 )edit

Do you mean the symlink feature of the .fixtures.yml ?

Alex Harvey gravatar imageAlex Harvey ( 2016-04-14 05:37:44 -0500 )edit

From what I understand spec/fixtures/modules/{module name} needs to exist. This is normally a symlink back to manifests and templates in the root directory. This is what I'm having a problem with on Windows. .fixtures on the other hand simply does a pull from the respective repo.

luksi1 gravatar imageluksi1 ( 2016-04-14 05:57:31 -0500 )edit

The symlinks feature of .fixtures.yml is usually used to (temporarily) create the symlink. So to clarify, is your issue that the symlinks feature of .fixtures.yml isn't working for you on Windows, or are you creating symlinks another way?

Alex Harvey gravatar imageAlex Harvey ( 2016-04-14 06:16:02 -0500 )edit