@Noah - Well.. I can supply additional Gemfile (tried that that before).
When Gemfile is in serverspec directory, busser run first time
installs Serverspec 2.0. After that there was second round of bundle
running with Gemfile in use - older version is also installed.
When tests are invoked there are two Serverspec versions installed, and
Serverspec 2.0 is used - test crashes.
Maybe I did something wrong ?
@Martin - Thanks for the information. I'll try that when i'll be at
work next week. Can you supply any example how you are doing that ?
Regards.
On Fri, 3 Oct 2014 20:01:42 -0700 Noah Kantrowitz < "> >
wrote:
> You can use a gemfile with busser-serverspec too I think.
>
> --Noah
>
> On Oct 3, 2014, at 2:57 PM, Martin Smith < "> >
> wrote:
>
> > Hi folks,
> >
> > My solution was to switch to busser-rspec, which allows you to
> > provide a Gemfile (and use that to pin back serverspec < 2). I
> > don't see any functional difference in that approach, and also
> > would allow you to pin rspec or install other gems required by
> > rspec/serverspec tests.
> >
> > Hope this helps,
> >
> > Martin B. Smith, ">
> >
> > ________________________________________
> > From: Rafał Trójniak [ "> ]
> > Sent: Friday, October 03, 2014 3:56 PM
> > To: ">
> > Subject: [chef] Re: Serverspec 2.0 release
> >
> > Helo,
> > Thanks, for that notification. I hope it will decrease time for
> > other people.
> >
> > I've bumped to this today, and:
> > - lost 1 hour to figure out what's going one (it was in the middle
> > of a tests)
> > - tried 1 hour to freeze version of serverspec in test-kitchen (see
> > below)
> > - learned in 20 minutes how to fix incompatibility
> >
> > Nerveless, this was quite unexpected end of the week. Is there any
> > way that I can force test-kitchen/busser to use only older
> > version ? Some way of effectively Gemfile would be really nice. It
> > would allow to migrate to new version of serverspec with
> > preparations, not by force.
> >
> > I've tried to google something, even dig into the code. I found
> > that I can put Gemfile inside serverspec directory (for example
> > tests/integration/default/serverspec/Gemfile). That almost worked
> > (older gems were also installed). But still old and new version is
> > present, ruby uses newer version and test crashes.
> >
> > I have run tests successfully only by invoking ruby manually,
> > specifying each library with -I option, but that's it.
> >
> > Regards.
> >
> > On Fri, 3 Oct 2014 12:20:18 -0700 (PDT)
> > < "> > wrote:
> >
> >> Most of you probably didn't know serverspec released a 2.0.0
> >> today[1]. You also might not have noticed but this likely breaks
> >> your test kitchen runs with something like this,
> >>
> >> /tmp/busser/suites/serverspec/spec_helper.rb:4:in `<top
> >> (required)>': uninitialized constant Serverspec::Helper::Exec
> >> (NameError) ...
> >>
> >> From Serverspec,
> >>
> >> spec_helper.rb incompatible
> >> spec_helper.rb does not have backward compatibility. So you
> >> should re-generate spec_helper.rb by serverspec-init and check it.
> >>
> >> Backend helper and DetectOS helper have been removed
> >> In version 1, you need to include SpecInfra::Helper::backend_type
> >> SpecInfra::Helper::DetectOS to detect the os of target hosts like
> >> this.
> >>
> >> require 'serverspec'
> >> include SpecInfra::Helper::Ssh
> >> include SpecInfra::Helper::DetectOS
> >>
> >> Test-Kitchen by default will install the latest version of
> >> serverspec. Thankfully upgrading is pretty easy. You can do the
> >> whole serverspec-init if you want but my helper looks like this,
> >>
> >> require 'serverspec'
> >>
> >> # Required by serverspec
> >> set :backend, :exec
> >>
> >> [1] - http://rubygems.org/gems/serverspec/versions/2.0.0
> >
> >
> > --
> > Rafał Trójniak
> > WEB : http://trojniak.net/
> > : ">
> > Jid : ">
> > GPG key-ID : 9A9A9E98
> > ABC8 83DF E717 6B76 CE49
> > BAFD 4F6F 854F 9A9A 9E98
>
--
Rafał Trójniak
WEB : http://trojniak.net/
: ">
Jid : ">
GPG key-ID : 9A9A9E98
ABC8 83DF E717 6B76 CE49
BAFD 4F6F 854F 9A9A 9E98
Archive powered by MHonArc 2.6.16.