Ask Your Question

rspec and windows symlinks

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

luksi1 gravatar image

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 -0600 )edit


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

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

Alex Harvey gravatar imageAlex Harvey ( 2016-04-14 05:37:44 -0600 )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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-15 01:16:35 -0600

tarzain gravatar image

you can keep your module on the git and checkout the code on each test run using .fixutres.yml. Here is an example:

I do understand your question, I am also looking for a solution still :/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-04-14 03:20:26 -0600

Seen: 7,314 times

Last updated: Apr 14 '16