Chef verify failed due to generated-cookbooks-pass-chefpec

Hi All,

After install chefdk, I run “chef verify” and “generated-cookbooks-pass-chefspec” failed. like followings:

[root@infbjvm357 ~]# chef verify
Running verification for component 'berkshelf’
Running verification for component 'test-kitchen’
Running verification for component 'tk-policyfile-provisioner’
Running verification for component 'chef-client’
Running verification for component 'chef-dk’
Running verification for component 'chef-provisioning’
Running verification for component 'chefspec’
Running verification for component 'generated-cookbooks-pass-chefspec’
Running verification for component 'rubocop’
Running verification for component 'fauxhai’
Running verification for component 'knife-spork’
Running verification for component 'kitchen-vagrant’
Running verification for component 'package installation’
Running verification for component 'openssl’
Running verification for component 'inspec’
Running verification for component 'delivery-cli’
Running verification for component 'git’
Running verification for component 'opscode-pushy-client’
Running verification for component ‘chef-sugar’

F

Failures:

  1. example::default When all attributes are default, on an Ubuntu 16.04 converges successfully
    Failure/Error: expect { chef_run }.to_not raise_error

    expected no Exception, got #<Net::HTTPFatalError: 502 “cannotconnect”> with backtrace:
    # ./spec/unit/recipes/default_spec.rb:15:in block (3 levels) in <top (required)>' # ./spec/unit/recipes/default_spec.rb:19:inblock (4 levels) in <top (required)>’
    # ./spec/unit/recipes/default_spec.rb:19:in `block (3 levels) in <top (required)>’

    ./spec/unit/recipes/default_spec.rb:19:in `block (3 levels) in <top (required)>’

Finished in 7.12 seconds (files took 5.75 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/recipes/default_spec.rb:18 # example::default When all attributes are default, on an Ubuntu 16.04 converges successfully

Verification of component ‘rubocop’ succeeded.
Verification of component ‘kitchen-vagrant’ succeeded.
Verification of component ‘openssl’ succeeded.
Verification of component ‘delivery-cli’ succeeded.
Verification of component ‘opscode-pushy-client’ succeeded.
Verification of component ‘berkshelf’ succeeded.
Verification of component ‘tk-policyfile-provisioner’ succeeded.
Verification of component ‘fauxhai’ succeeded.
Verification of component ‘inspec’ succeeded.
Verification of component ‘test-kitchen’ succeeded.
Verification of component ‘chef-dk’ succeeded.
Verification of component ‘chefspec’ succeeded.
Verification of component ‘knife-spork’ succeeded.
Verification of component ‘git’ succeeded.
Verification of component ‘chef-sugar’ succeeded.
Verification of component ‘chef-client’ succeeded.
Verification of component ‘chef-provisioning’ succeeded.
Verification of component ‘generated-cookbooks-pass-chefspec’ failed.
Verification of component ‘package installation’ succeeded.

Can anyone help me with this?

If you're not interested in developing ChefDK, you can ignore this. There's probably something in your network environment that the tests don't expect, but the tests are intended to run in the build pipeline and don't support other environments.