Contents

Cookbook Validity

@announce @cookbooks @cookbook_validity

In order to understand cookbooks without evaluating them As an Administrator I want to automatically confirm cookbook existence and validity

Background:

  • Given a default base Chef repository in "ckbk/scratch/myapp"

Scenario: Clone from a Cookbook repository

  • Given Explanation: Next we step up two levels to escape Aruba's working folder
  • And the remote Cookbook repository "./../../features/data/repositories/cookbooks/hosts/.git"
  • When I clone the remote Cookbook repository branch "master" to "ckbk/scratch/myapp/cookbooks/hosts"
  • Then the local Cookbook repository exists
  • And the local Cookbook "hosts" exists

Scenario: Clone a single Cookbook from a Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbook "hosts" branch "master" to "ckbk/scratch/myapp/cookbooks/hosts2"
  • Then the local Cookbook repository exists
  • And the local Cookbook "hosts" exists

Scenario: Clone a single Site-Cookbook from a Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbook "hosts" branch "master" to "ckbk/scratch/myapp/site-cookbooks/hosts2"
  • Then the local Site-Cookbook repository exists
  • And the local Site-Cookbook "hosts" exists

Scenario: Clone non-existant Cookbooks from a Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbooks:
    cookbooktagdestination
    hfgrt37s.0.1.0ckbk/scratch/myapp/cookbooks/hosts3
  • Then the output contains "Could not find Repository cookbooks/hfgrt"

Scenario: Clone multiple Cookbooks from a Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbooks:
    cookbookbranchtagrefdestination
    hosts37s.0.1.0ckbk/scratch/myapp/cookbooks/hosts3
    users37sckbk/scratch/myapp/cookbooks/users
    xmlmasterb7a11ea4ebckbk/scratch/myapp/cookbooks/xml
  • And these local Cookbooks exist:
    cookbook
    hosts3
    users
    xml

Scenario: Clone multiple Site-Cookbooks from a Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbooks:
    cookbookbranchdestination
    hostsmasterckbk/scratch/myapp/site-cookbooks/hosts4
    usersmasterckbk/scratch/myapp/site-cookbooks/users2
  • And these local Site-Cookbooks exist:
    cookbook
    hosts4
    users2

Scenario: Download Site-Cookbooks from a Cookbooks URI

  • Given the remote Cookbooks URI "git://github.com/cookbooks/"
  • When I clone the Cookbooks:
    cookbookbranchdestination
    users37sckbk/scratch/myapp/cookbooks/users
    users37sckbk/scratch/myapp/site-cookbooks/users2
  • Then these local Cookbooks exist:
    cookbooksite-cookbook
    users
    users2

Source: features/chef_examples/cookbooks_cookbook.feature at commit efec2546, Cuken (Apache-2.0 license).