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

execute.with_change Permission denied #14

Closed
jhoblitt opened this issue May 17, 2014 · 2 comments
Closed

execute.with_change Permission denied #14

jhoblitt opened this issue May 17, 2014 · 2 comments
Labels
Milestone

Comments

@jhoblitt
Copy link

I'm getting a test failure on code that used to be passing and I suspect this is due to changes in one or more gems (since the code is unchanged).

With rspec-puppet > 1.0.1 (bab28390f032c1270f00ee75e0cb3dfe7955878a_ and rspec-puppet-augeas 0.3.0 (with #9 reverted), I am seeing this error:

  1) mdadm::config options => { mailaddr => foo } Augeas[mdadm.conf mailaddr] should change MAILADDR
     Failure/Error: should execute.with_change
     RuntimeError:
       Got 2 failure(s) while initializing: File[/etc/puppet/ssl]: change from absent to directory failed: Could not set 'directory' on ensure: Permission denied - /etc/puppet/ssl; File[/home/jhoblitt/github/puppet-mdadm/spec/fixtures/modules/stdlib/lib:/home/jhoblitt/github/puppet-mdadm/spec/fixtures/modules/mdadm/lib]: change from absent to directory failed: Cannot create /home/jhoblitt/github/puppet-mdadm/spec/fixtures/modules/stdlib/lib:/home/jhoblitt/github/puppet-mdadm/spec/fixtures/modules/mdadm/lib; parent directory /home/jhoblitt/github/puppet-mdadm/spec/fixtures/modules/stdlib/lib:/home/jhoblitt/github/puppet-mdadm/spec/fixtures/modules/mdadm does not exist
     # ./spec/unit/classes/mdadm_config_spec.rb:22:in `block (5 levels) in <top (required)>'

It seems that the augeas gem is presently broken on travis-ci: https://travis-ci.org/jhoblitt/puppet-mdadm/jobs/25376918 :(

Here is a link to the code that is failing for me, which was passing ~6months ago. Does this look like a problem with my rspec test or is it gem wackiness?

@jhoblitt
Copy link
Author

I've tested various puppet version (3.5, 3.4, 3.3, 3.2.1) and ruby 2.0 / 1.8.7 with the same result. Sigh.

@jhoblitt
Copy link
Author

OK - some progress, it does work with rspec-puppet (0.1.6) and I've confirmed that rspec-puppet is the only gem version bundler is changing between the test passing and failing.

$ diff -u 016.txt 101.txt 
--- 016.txt 2014-05-16 18:05:58.094242703 -0700
+++ 101.txt 2014-05-16 18:05:36.902627760 -0700
@@ -17,6 +17,6 @@
   * rspec-core (2.14.8)
   * rspec-expectations (2.14.5)
   * rspec-mocks (2.14.6)
-  * rspec-puppet (0.1.6)
+  * rspec-puppet (1.0.1 bab2839)
   * rspec-puppet-augeas (0.3.0 6152e28)
   * ruby-augeas (0.5.0)

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

No branches or pull requests

2 participants