Jira (PUP-2076) Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)

2018-04-09 Thread Chadwick (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Chadwick commented on  PUP-2076  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)   
 

  
 
 
 
 

 
 Just an FYI – it looks like a mocha update from 1.4.0 to 1.5.0 makes this workaround blow up with the following error:   Failure/Error: Puppet.features.stubs(:root? => true) {{ Mocha::NotInitializedError:}} {{ Mocha methods cannot be used outside the context of a test}}  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2076) Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)

2017-05-18 Thread Moses Mendoza (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Moses Mendoza updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-2076 
 
 
 
  Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)  
 
 
 
 
 
 
 
 
 

Change By:
 
 Moses Mendoza 
 
 
 

Labels:
 
 triaged 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2076) Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)

2017-05-16 Thread Joe Pinsonault (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Joe Pinsonault updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-2076 
 
 
 
  Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)  
 
 
 
 
 
 
 
 
 

Change By:
 
 Joe Pinsonault 
 
 
 

Labels:
 
 triaged 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2076) Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)

2015-08-26 Thread Alex Harvey (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Alex Harvey commented on  PUP-2076 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)  
 
 
 
 
 
 
 
 
 
 
A workaround for this is: 
In spec_helper.rb - ensure you are requiring 'puppetlabs_spec_helper/module_spec_helper' and not simply 'rspec-puppet', and then add the following: 
 
 
 
 
 
 
RSpec.configure do |c| 
 
 
 
 
  ... 
 
 
 
 
  c.before(:each) do 
 
 
 
 
Puppet.features.stubs(:root? = true) 
 
 
 
 
  end 
 
 
 
 
end
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
  

Jira (PUP-2076) Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)

2014-03-27 Thread Ralph BOlton (JIRA)
Title: Message Title










 

 Ralph BOlton created an issue


















 Puppet /  PUP-2076



  Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248) 










Issue Type:

  Bug




Affects Versions:


 2.7.25




Assignee:

 Eric Sorenson




Components:


 Test Infrastructure




Created:


 27/Mar/14 6:54 AM




Environment:


Linux (RHEL5/6, although others equally affected)




Priority:

  Normal




Reporter:

 Ralph BOlton












   

 Add Comment


















 

Jira (PUP-2076) Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248)

2014-03-27 Thread Ralph BOlton (JIRA)
Title: Message Title










 

 Ralph BOlton updated an issue


















 Puppet /  PUP-2076



  Unit Tests Fail if not run as root (continues http://projects.puppetlabs.com/issues/16248) 










Change By:

 Ralph BOlton









 ThisfollowsonfromBug16248(http://projects.puppetlabs.com/issues/16248).Itseemsthatrunning--noopandrunningunittestswithrspec-puppetbothsufferthesameproblem-thatis,thatcorePuppettriestodothingsthatonlyrootcando.Inthecaseofrunning--noop,Ithinkthepreviousbugarrivesatareasonableconclusion-thatisthat--noopasanon-rootuserisn'tespeciallyappropriatebecauseanordinaryusermaynothaveaccesstothefilesandbinariesthatwouldbeneededtoevencalculatewhatworkneedstobedone.However,rspec-puppetunittestsabsolutelyshouldn'tneedtoberunasroot.Sincetheyreallyonlytestthecatalogue,thereshouldbeverylittleneedtodosomeofthethingsPuppetappearstodo.Itturnsoutthatrspec-puppet's'shouldcompile'testalwaysfailsifyouhaveauserspecificationinthemanifest(seebugexploringthisproblem:https://github.com/rodjek/rspec-puppet/issues/175).Thisappearstobebecausepuppetattemptstostat()(andmayberun)binariessuchas/usr/sbin/usermod,evenwhenjustbuildingupthecatalogueinthetestenvironmentClearly,thisisunnecessarywhencheckingagainstaunittestspec.Whatcanwedoaboutthis?Itseemsunlikelythatrspec-puppetcanresolvethisproblemwithoutsomemovementinPuppetitself.












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at