[chef] Re: Re: Test-Kitchen & serverspec woes


Chronological Thread 
  • From: Cassiano Leal < >
  • To:
  • Subject: [chef] Re: Re: Test-Kitchen & serverspec woes
  • Date: Thu, 20 Jun 2013 22:30:18 -0300

The spec_helper so far has only “require ‘serverspec’” in it.

localhost/logstash_agent_spec.rb has:

require 'spec_helper'

describe 'Logstash Agent' do
  it 'downloads and installs the logstash jar' do
    jar = file '/opt/logstash/agent/lib/logstash-1.1.1-monolithic-es0.19.10.jar'
    expect(jar).to be_file
    expect(jar).to match_md5checksum '3eb8159a1566b3d21ec62b34c5984427'
  end

  # A couple of other specs here
end

And that’s it, really.

- cassiano

On Thursday, June 20, 2013 at 18:23, Jesse Nelson wrote:

Whats your helper and spec files look like ? I have working / simple example in my skeleton repo that should work https://github.com/spheromak/test_cook_skeleton/tree/master/test/integration/default/serverspec




On Thu, Jun 20, 2013 at 11:58 AM, Cassiano Leal < " target="_blank"> > wrote:
Hey ho!

I’m having a bit of trouble running serverspec ... erm... specs in Test Kitchen 1.0.0.alpha.7.

This is an exerpt of the kind of error I’m seeing:

-----> Running serverspec test suite
/opt/chef/embedded/bin/ruby -I/opt/busser/suites/serverspec -S /opt/chef/embedded/bin/rspec /opt/busser/suites/serverspec/localhost/logstash_agent_spec.rb
FFF

Failures:

  1) Logstash Agent downloads the jar and install it
     Failure/Error: Unable to find matching line from backtrace
     NameError: undefined local variable or method `backend' for #<RSpec::Core::ExampleGroup::Nested_1:0x00000002e96068>


     # /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.13.0/lib/rspec/matchers/method_missing.rb:9:in `method_missing'
     # /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/serverspec-0.6.6/lib/serverspec.rb:42:in `block (2 levels) in <top (required)>'
     # /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/example.rb:237:in `instance_eval’
(...)

I have my specs in test/integration/default/serverspec/localhost (with a spec_helper.rb in its parent dir). All three specs fail with the same error.

The node conversion ran without problems, and I manually verified that it worked as expected, but the specs failed miserably.

Any ideas where should I look for the problem?

- cassiano






Archive powered by MHonArc 2.6.16.

§