# Minitest-handler cookbook errors after upgrading chef-client

**URL:** <https://discourse.chef.io/t/minitest-handler-cookbook-errors-after-upgrading-chef-client/5051>\
**Category:** Chef Infra (archive)\
**Created:** [February 19, 2014, 6:14pm UTC](https://discourse.chef.io/t/minitest-handler-cookbook-errors-after-upgrading-chef-client/5051 "2014-02-19T18:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Anderson](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@Brian\_Anderson](https://discourse.chef.io/u/Brian_Anderson)\
**Post date:** [February 19, 2014, 6:14pm UTC](https://discourse.chef.io/t/minitest-handler-cookbook-errors-after-upgrading-chef-client/5051/1 "2014-02-19T18:14:15Z")

</div>

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

> **[Affectiva - Humanizing Technology with Emotion AI](https://www.affectiva.com/)**
>
> Affectiva's Emotion AI is a machine learning-based software that can detect complex and nuanced human cognitive and emotional states.

[http://www.facebook.com/affectiva](http://www.facebook.com/affectiva)[https://twitter.com/Affectiva](https://twitter.com/Affectiva)  
[http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva)  
[http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2)  
[https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts)

---

<div class="post-metadata">

**Author:** ![David\_Petzel](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/david_petzel/32/38_2.png) [@David\_Petzel](https://discourse.chef.io/u/David_Petzel)\
**Post date:** [February 19, 2014, 6:27pm UTC](https://discourse.chef.io/t/minitest-handler-cookbook-errors-after-upgrading-chef-client/5051/2 "2014-02-19T18:27:48Z")

</div>

I believe this was an issue in the handler itself (

> <https://github.com/chef-boneyard/minitest-chef-handler/blob/master/History.txt#L1>

).

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](mailto: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.affectiva.com)  
> [http://www.facebook.com/affectiva](http://www.facebook.com/affectiva)[https://twitter.com/Affectiva](https://twitter.com/Affectiva) [http://www.youtube.com/user/affectiva](http://www.youtube.com/user/affectiva)  
> [http://www.affectiva.com/blog/](http://www.affectiva.com/blog/) [http://www.linkedin.com/company/affectiva\_2](http://www.linkedin.com/company/affectiva_2)  
> [https://plus.google.com/b/115885368219797754125/115885368219797754125/posts](https://plus.google.com/b/115885368219797754125/115885368219797754125/posts)
