Permalink
Browse files

update example feature generation

  • Loading branch information...
1 parent 859a01b commit a528b9d8478c1a2844ccda28aad3bca463a794a9 Zachary Patten committed Apr 7, 2013
View
@@ -36,15 +36,16 @@ class CucumberChef < Thor
CucumberChef.source_root source_dir
templates = {
- "readme.erb" => "features/#{project}/README",
+ "readme.erb" => "features/#{project}/README.md",
"example_feature.erb" => "features/#{project}/#{project}.feature",
"example_steps.erb" => "features/#{project}/step_definitions/#{project}_steps.rb",
+ "example_labfile.erb" => "Labfile",
"env.rb" => "features/support/env.rb",
"cc-hooks.rb" => "features/support/cc-hooks.rb",
- "readme-data_bags.erb" => "features/support/data_bags/README",
- "readme-roles.erb" => "features/support/roles/README",
- "readme-keys.erb" => "features/support/keys/README",
- "readme-environments.erb" => "features/support/environments/README"
+ "readme-data_bags.erb" => "features/support/data_bags/README.md",
+ "readme-roles.erb" => "features/support/roles/README.md",
+ "readme-keys.erb" => "features/support/keys/README.md",
+ "readme-environments.erb" => "features/support/environments/README.md"
}
templates.each do |source, destination|
@@ -1,52 +1,10 @@
@<%= @project %>
-Feature: Perform test driven infrastructure with Cucumber-Chef
- In order to learn how to develop test driven infrastructure
- As an infrastructure developer
- I want to better understand how to use Cucumber-Chef
+Feature: <%= @project %>
+ In order to automate server provisioning with Opscode Chef
+ As a DevOp Engineer
+ I want to ensure that <%= @project %> is verb on my servers
Background:
- * I have a server called "<%= @project %>"
- * "<%= @project %>" is running "ubuntu" "precise"
- * "<%= @project %>" has been provisioned
- * the following cookbooks have been uploaded:
- | cookbook | cookbook_path |
- | chef-client | ./cookbooks |
- * the "chef-client::service" recipe has been added to the "<%= @project %>" run list
- * the chef-client has been run on "<%= @project %>"
- * I ssh to "<%= @project %>" with the following credentials:
+ * I ssh to "<%= @project %>-app-1" with the following credentials:
| username | keyfile |
- | root | ./.cucumber-chef/id_rsa-ubuntu |
-
- Scenario: Can connect to the provisioned server via SSH authentication
- When I run "hostname"
- Then I should see "<%= @project %>" in the output
-
- Scenario: Default root shell is bash
- When I run "echo $SHELL"
- Then I should see "bash" in the output
-
- Scenario: Default gateway and resolver are using Cucumber-Chef Test Lab
- When I run "route -n | grep 'UG'"
- Then I should see "192.168.255.254" in the output
- When I run "cat /etc/resolv.conf"
- Then I should see "192.168.255.254" in the output
- And I should see "8.8.8.8" in the output
- And I should see "8.8.4.4" in the output
-
- Scenario: Primary interface is configured with my IP address and MAC address
- When I run "ifconfig eth0"
- Then I should see the "IP" of "<%= @project %>" in the output
- And I should see the "MAC" of "<%= @project %>" in the output
-
- Scenario: Local interface is not configured with my IP address or MAC address
- When I run "ifconfig lo"
- Then I should see "127.0.0.1" in the output
- And I should not see the "IP" of "<%= @project %>" in the output
- And I should not see the "MAC" of "<%= @project %>" in the output
-
- Scenario: Chef-Client is running as a daemon
- When I run "ps aux | grep [c]hef-client"
- Then I should see "chef-client" in the output
- And I should see "-d" in the output
- And I should see "-i 1800" in the output
- And I should see "-s 20" in the output
+ | $lxc$ | $lxc$ |
@@ -0,0 +1,15 @@
+#!/usr/bin/env ruby
+#^syntax detection
+
+ecosystem "<%= @project %>-ecosystem-1" do
+
+ container "<%= @project %>-app-1" do
+ distro "ubuntu"
+ release "lucid"
+ persist true
+ ip "192.168.0.1"
+ mac "00:00:5e:35:ea:d5"
+ chef_client ({ :run_list => [] })
+ end
+
+end

0 comments on commit a528b9d

Please sign in to comment.