features/config.feature in berkshelf-0.6.0.beta4 vs features/config.feature in berkshelf-1.0.0.rc1
- old
+ new
@@ -5,11 +5,10 @@
Scenario: creating a new cookbook when no Berkshelf config exists
Given I do not have a Berkshelf config file
When I run the cookbook command to create "sparkle_motion"
Then the resulting "sparkle_motion" Vagrantfile should contain:
- | config.vm.host_name = "sparkle_motion-berkshelf" |
| config.vm.box = "Berkshelf-CentOS-6.3-x86_64-minimal" |
| config.vm.box_url = "https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box" |
And the exit status should be 0
Scenario: creating a new cookbook using a Berkshelf config
@@ -21,11 +20,10 @@
"box": "my_box",
"box_url": "http://files.vagrantup.com/lucid64.box",
"forward_port": {
"12345": "54321"
},
- "host_name": "my_host",
"network": {
"bridged": true,
"hostonly": "12.34.56.78"
}
}
@@ -35,11 +33,10 @@
When I run the cookbook command to create "sparkle_motion"
Then the resulting "sparkle_motion" Vagrantfile should contain:
| config.vm.box = "my_box" |
| config.vm.box_url = "http://files.vagrantup.com/lucid64.box" |
| config.vm.forward_port 12345, 54321 |
- | config.vm.host_name = "my_host" |
| config.vm.network :hostonly, "12.34.56.78" |
| config.vm.network :bridged |
And the exit status should be 0
Scenario: creating a new cookbook using a partial Berkshelf config
@@ -62,27 +59,30 @@
Scenario: creating a new cookbook using an invalid Berkshelf config
Given I have a Berkshelf config file containing:
"""
{
- "wat": null
+ "vagrant": null
}
"""
When I run the cookbook command to create "sparkle_motion"
Then the output should contain "Invalid configuration"
- And the output should contain "wat is not a valid key"
+ And the output should contain "vagrant.vm.box Expected attribute: 'vagrant.vm.box' to be a type of: 'String'"
+ And the output should contain "vagrant.vm.box A value is required for attribute: 'vagrant.vm.box'"
+ And the output should contain "vagrant.vm.box_url Expected attribute: 'vagrant.vm.box_url' to be a type of: 'String'"
+ And the output should contain "vagrant.vm.box_url A value is required for attribute: 'vagrant.vm.box_url'"
And the CLI should exit with the status code for error "InvalidConfiguration"
Scenario: creating a new cookbook with a chef client config
Given I have a Berkshelf config file containing:
"""
{
+ "chef": {
+ "chef_server_url": "localhost:4000",
+ "validation_client_name": "my_client-validator",
+ "validation_key_path": "/a/b/c/my_client-validator.pem"
+ },
"vagrant": {
- "chef": {
- "chef_server_url": "localhost:4000",
- "validation_client_name": "my_client-validator",
- "validation_key_path": "/a/b/c/my_client-validator.pem"
- },
"vm": {
"provision": "chef_client"
}
}
}