cucumber-chef 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/cucumber-chef
CHANGED
@@ -36,15 +36,16 @@ class CucumberChef < Thor
|
|
36
36
|
|
37
37
|
CucumberChef.source_root source_dir
|
38
38
|
templates = {
|
39
|
-
"readme.erb" => "features/#{project}/README",
|
39
|
+
"readme.erb" => "features/#{project}/README.md",
|
40
40
|
"example_feature.erb" => "features/#{project}/#{project}.feature",
|
41
41
|
"example_steps.erb" => "features/#{project}/step_definitions/#{project}_steps.rb",
|
42
|
+
"example_labfile.erb" => "Labfile",
|
42
43
|
"env.rb" => "features/support/env.rb",
|
43
44
|
"cc-hooks.rb" => "features/support/cc-hooks.rb",
|
44
|
-
"readme-data_bags.erb" => "features/support/data_bags/README",
|
45
|
-
"readme-roles.erb" => "features/support/roles/README",
|
46
|
-
"readme-keys.erb" => "features/support/keys/README",
|
47
|
-
"readme-environments.erb" => "features/support/environments/README"
|
45
|
+
"readme-data_bags.erb" => "features/support/data_bags/README.md",
|
46
|
+
"readme-roles.erb" => "features/support/roles/README.md",
|
47
|
+
"readme-keys.erb" => "features/support/keys/README.md",
|
48
|
+
"readme-environments.erb" => "features/support/environments/README.md"
|
48
49
|
}
|
49
50
|
|
50
51
|
templates.each do |source, destination|
|
@@ -1,52 +1,10 @@
|
|
1
1
|
@<%= @project %>
|
2
|
-
Feature:
|
3
|
-
In order to
|
4
|
-
As
|
5
|
-
I want to
|
2
|
+
Feature: <%= @project %>
|
3
|
+
In order to automate server provisioning with Opscode Chef
|
4
|
+
As a DevOp Engineer
|
5
|
+
I want to ensure that <%= @project %> is verb on my servers
|
6
6
|
|
7
7
|
Background:
|
8
|
-
* I
|
9
|
-
* "<%= @project %>" is running "ubuntu" "precise"
|
10
|
-
* "<%= @project %>" has been provisioned
|
11
|
-
* the following cookbooks have been uploaded:
|
12
|
-
| cookbook | cookbook_path |
|
13
|
-
| chef-client | ./cookbooks |
|
14
|
-
* the "chef-client::service" recipe has been added to the "<%= @project %>" run list
|
15
|
-
* the chef-client has been run on "<%= @project %>"
|
16
|
-
* I ssh to "<%= @project %>" with the following credentials:
|
8
|
+
* I ssh to "<%= @project %>-app-1" with the following credentials:
|
17
9
|
| username | keyfile |
|
18
|
-
|
|
19
|
-
|
20
|
-
Scenario: Can connect to the provisioned server via SSH authentication
|
21
|
-
When I run "hostname"
|
22
|
-
Then I should see "<%= @project %>" in the output
|
23
|
-
|
24
|
-
Scenario: Default root shell is bash
|
25
|
-
When I run "echo $SHELL"
|
26
|
-
Then I should see "bash" in the output
|
27
|
-
|
28
|
-
Scenario: Default gateway and resolver are using Cucumber-Chef Test Lab
|
29
|
-
When I run "route -n | grep 'UG'"
|
30
|
-
Then I should see "192.168.255.254" in the output
|
31
|
-
When I run "cat /etc/resolv.conf"
|
32
|
-
Then I should see "192.168.255.254" in the output
|
33
|
-
And I should see "8.8.8.8" in the output
|
34
|
-
And I should see "8.8.4.4" in the output
|
35
|
-
|
36
|
-
Scenario: Primary interface is configured with my IP address and MAC address
|
37
|
-
When I run "ifconfig eth0"
|
38
|
-
Then I should see the "IP" of "<%= @project %>" in the output
|
39
|
-
And I should see the "MAC" of "<%= @project %>" in the output
|
40
|
-
|
41
|
-
Scenario: Local interface is not configured with my IP address or MAC address
|
42
|
-
When I run "ifconfig lo"
|
43
|
-
Then I should see "127.0.0.1" in the output
|
44
|
-
And I should not see the "IP" of "<%= @project %>" in the output
|
45
|
-
And I should not see the "MAC" of "<%= @project %>" in the output
|
46
|
-
|
47
|
-
Scenario: Chef-Client is running as a daemon
|
48
|
-
When I run "ps aux | grep [c]hef-client"
|
49
|
-
Then I should see "chef-client" in the output
|
50
|
-
And I should see "-d" in the output
|
51
|
-
And I should see "-i 1800" in the output
|
52
|
-
And I should see "-s 20" in the output
|
10
|
+
| $lxc$ | $lxc$ |
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#^syntax detection
|
3
|
+
|
4
|
+
ecosystem "<%= @project %>-ecosystem-1" do
|
5
|
+
|
6
|
+
container "<%= @project %>-app-1" do
|
7
|
+
distro "ubuntu"
|
8
|
+
release "lucid"
|
9
|
+
persist true
|
10
|
+
ip "192.168.0.1"
|
11
|
+
mac "00:00:5e:35:ea:d5"
|
12
|
+
chef_client ({ :run_list => [] })
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -24,7 +24,7 @@ module Cucumber
|
|
24
24
|
|
25
25
|
################################################################################
|
26
26
|
|
27
|
-
VERSION = "3.0.
|
27
|
+
VERSION = "3.0.1" unless const_defined?(:VERSION)
|
28
28
|
|
29
29
|
################################################################################
|
30
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -283,6 +283,7 @@ files:
|
|
283
283
|
- lib/cucumber/chef/templates/cucumber/cc-hooks.rb
|
284
284
|
- lib/cucumber/chef/templates/cucumber/env.rb
|
285
285
|
- lib/cucumber/chef/templates/cucumber/example_feature.erb
|
286
|
+
- lib/cucumber/chef/templates/cucumber/example_labfile.erb
|
286
287
|
- lib/cucumber/chef/templates/cucumber/example_steps.erb
|
287
288
|
- lib/cucumber/chef/templates/cucumber/readme-data_bags.erb
|
288
289
|
- lib/cucumber/chef/templates/cucumber/readme-environments.erb
|