title: Testing chef data bags
body: <p>I need to test chef recipe. This is using a data bag.</p>
  <p><code>kitchen</code> is using <code>chef_zero</code> in order to provision the machine. So, it's not able to get my data bag hosted on server. Then it's telling me that my data bag is not available.</p>
  <p>How could I get a data bag available on test kitchen?</p>
  <p>I've created a <code>aws.json</code> file on <code>test\integration\data_bags</code>:</p>
  <pre><code>{
    &quot;id&quot;: &quot;dev&quot;,
    &quot;aws_access_key_id&quot;: &quot;----&quot;,
    &quot;aws_secret_access_key&quot;: &quot;----&quot;
  }
  </code></pre>
  <p>When I perform my converge I'm getting this message:</p>
  <blockquote>
  <p>INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/data/aws/dev</p>
  <p>ERROR: Failed to load data bag item: &quot;aws&quot; &quot;dev&quot;</p>
  </blockquote>
  <p><code>.kitchen.yml</code> file content:</p>
  <pre><code>---
  driver:
    name: vagrant
  
  provisioner:
    name: chef_zero
    always_update_cookbooks: true
  
  verifier:
    name: inspec
  
  platforms:
    - name: ubuntu-16.04
    - name: centos-7.2
  
  suites:
    - name: default
      data_bags_path: &quot;test/integration/data_bags&quot;
      run_list:
        - recipe[living-development::default]
      verifier:
        inspec_tests:
          - test/smoke/default
      attributes:
  </code></pre>
  <p>Versions:</p>
  <pre><code>$ vagrant -v
  1.9.2
  
  $ chef -v
  Chef Development Kit Version: 1.2.22
  chef-client version: 12.18.31
  delivery version: master (0b746cafed65a9ea1a79de3cc546e7922de9187c)
  berks version: 2017-03-08T11:19:04.643719 5824] 2017-03-08T11:19:04.643719 5824] 2017-03-08T11:19:04.643719 5824] 2017-03-08T11:19:04.643719 5824] 2017-03-08T11:19:04.700789 5824] 2017-03-08T11:19:04.700789 5824] 5.6.0
  kitchen version: 1.15.0
  </code></pre>