Minitest-handler cookbook errors after upgrading chef-client


#1

Here’s my situation.

I’ve got an internal cookbook for deploying our application to our stacks.
I’m using the minitest-handler cookbook to run automated tests on it.

Here is an example of a very basic test that I’m having trouble with:

[2014-02-19T17:42:14+00:00] INFO: *** Chef 11.4.4 ***

    it "Creates a timestamped directory" do
     file(node['portal']['wardir']).must_exist
     file(node['portal']['wardir']).must_have(:owner,

node[‘fleet’][‘systemuser’])
file(node[‘portal’][‘wardir’]).must_have(:mode, “755”)
end

Under chef 11.4.4 this test works as expected:

affdex::portal_war_erb#test_0001_Creates a timestamped directory =

0.00 s =
.

Same box, after upgrading to the latest chef-client

[2014-02-19T18:04:56+00:00] INFO: *** Chef 11.10.2 ***

affdex::portal_war_erb#test_0001_Creates a timestamped directory =
0.00 s = F

  1. Failure:
    affdex::portal_war_erb#test_0001_Creates a timestamped directory
    [/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/minitest-chef-handler-1.0.1/lib/minitest-chef-handler/resources.rb:48]:
    The file /home/webapps/portal/releases/1392833097 does not have the
    expected owner.
    Expected: "affect"
    Actual: nil

I’m getting nil back on any permissions/ownership type tests under
chef-client 11.10.2.

Is there a change that I missed that is causing this?

Brian

Brian Anderson | Operations Engineer
Phone 781.696.1304

www.affectiva.com
http://www.facebook.com/affectiva https://twitter.com/Affectiva
http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts


#2

I believe this was an issue in the handler itself (


).

If you set your node attribute [:minitest][:chef_handler_gem_version] =
‘1.0.2’ the default is still 1.0.1, I think it will fix that issue for you.

On Wed, Feb 19, 2014 at 1:14 PM, Brian Anderson <
brian.anderson@affectiva.com> wrote:

Here’s my situation.

I’ve got an internal cookbook for deploying our application to our stacks.
I’m using the minitest-handler cookbook to run automated tests on it.

Here is an example of a very basic test that I’m having trouble with:

[2014-02-19T17:42:14+00:00] INFO: *** Chef 11.4.4 ***

    it "Creates a timestamped directory" do
     file(node['portal']['wardir']).must_exist
     file(node['portal']['wardir']).must_have(:owner,

node[‘fleet’][‘systemuser’])
file(node[‘portal’][‘wardir’]).must_have(:mode, “755”)
end

Under chef 11.4.4 this test works as expected:

affdex::portal_war_erb#test_0001_Creates a timestamped directory =

0.00 s =
.

Same box, after upgrading to the latest chef-client

[2014-02-19T18:04:56+00:00] INFO: *** Chef 11.10.2 ***

affdex::portal_war_erb#test_0001_Creates a timestamped directory =
0.00 s = F

  1. Failure:
    affdex::portal_war_erb#test_0001_Creates a timestamped directory
    [/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/minitest-chef-handler-1.0.1/lib/minitest-chef-handler/resources.rb:48]:
    The file /home/webapps/portal/releases/1392833097 does not have the
    expected owner.
    Expected: "affect"
    Actual: nil

I’m getting nil back on any permissions/ownership type tests under
chef-client 11.10.2.

Is there a change that I missed that is causing this?

Brian

Brian Anderson | Operations Engineer
Phone 781.696.1304

www.affectiva.com
http://www.facebook.com/affectiva https://twitter.com/Affectiva http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts