This MAY be a bug with serverspec or specinfra gems, but I was hoping 
someone here could help me identify the problem.  I wrote some tests that 
ensure file resources are removed and yumrepo resources are disabled.  I 
was using older beaker gem and recently updated to latest 1.9.1 to find 
that my "should_not" matchers all fail. 

      describe yumrepo('centos-scl') do
        it { should exist }
        it { should_not be_enabled }
      end

centos-65-x64 17:29:19$  yum repolist all -C | grep ^centos-scl | grep 
enabled

centos-65-x64 executed in 0.14 seconds
Exited: 1
      should not be enabled (FAILED - 4)
      should not be enabled (FAILED - 4)


  4) repo_centos class default parameters Yumrepo "centos-scl" should not 
be enabled
     Failure/Error: it { should_not be_enabled }
       yum repolist all -C | grep ^centos-scl | grep enabled
       expected Yumrepo "centos-scl" not to be enabled

The same false failure occurs for file with "should_not be_file" matcher.

describe file('/etc/yum.repos.d/CentOS-Base.repo') do
  it { should_not be_file }
end

  6) repo_centos class default parameters File 
"/etc/yum.repos.d/CentOS-Base.repo" should not be file
     Failure/Error: it { should_not be_file }
       test -f /etc/yum.repos.d/CentOS-Base.repo
       expected file? to return false, got 
#<SpecInfra::CommandResult:0x10eff4498 @stderr="", @stdout="", 
@exit_signal=nil, @exit_status=1>
     # ./spec/acceptance/01_repo_centos_spec.rb:56

The module I'm working on is at https://github.com/treydock/repo_centos.

Thanks
- Trey

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5d9ef6d6-f753-42c4-bede-bb3c1544212e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to