Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleanup examples

  • Loading branch information...
commit ec25d1ba5c9696bbf8c6f2db300d244f2c879495 1 parent 7d0ff69
@zpatten zpatten authored
View
8 examples/README.md
@@ -1,7 +1,3 @@
-Examples
-========
+Examples:
-This directory contains various examples in the form of early feature tests for some of my cookbooks. You can find out more about the cookbooks on GitHub:
-
-https://github.com/jovelabs
-https://github.com/zpatten
+* https://github.com/zpatten/cc-chef-repo
View
51 examples/users_add.feature
@@ -1,51 +0,0 @@
-@users
-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
-
- Background:
- * I have a server called "users"
- * "users" is running "ubuntu" "lucid"
- * "users" has been provisioned
- * the following roles have been updated:
- | role | role_path |
- | users | ./support/roles/ |
- * the "users" role has been added to the "users" run list
- * the following databags have been updated:
- | databag | databag_path |
- | users | ./support/data_bags/users |
- * the chef-client has been run on "users"
- * I ssh to "users" with the following credentials:
- | username | keyfile |
- | root | ../.ssh/id_rsa |
-
- Scenario: The user has been added
- When I run "cat /etc/passwd | grep [b]dobbs"
- Then I should see "bdobbs" in the output
- And I should see "/home/bdobbs" in the output
- And I should see "/bin/bash" in the output
-
- Scenario: The user's groups have been added
- When I run "cat /etc/group | grep [b]dobbs"
- Then I should see "bdobbs" in the output
- And I should see "sysop" in the output
- And I should see "dba" in the output
- And I should see "dev" in the output
-
- Scenario: The user's ssh keys have been populated
- When I run "cat /home/bdobbs/.ssh/authorized_keys"
- Then I should see "ssh-rsa" in the output
- And I should see "bob@dobbs" in the output
-
- Scenario: The user's ssh config has been populated
- When I run "cat /home/bdobbs/.ssh/config"
- Then I should see "KeepAlive yes" in the output
- And I should see "ServerAliveInterval 60" in the output
-
- Scenario: The user can ssh in to the system with their key pair
- * I ssh to "users" with the following credentials:
- | username | keyfile |
- | bdobbs | ./support/keys/bdobbs |
- When I run "hostname"
- Then I should see "users" in the output
View
50 examples/users_auto_remove.feature
@@ -1,50 +0,0 @@
-@users
-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
-
- Background:
- * I have a server called "users"
- * "users" is running "ubuntu" "lucid"
- * "users" has been provisioned
- * the following roles have been updated:
- | role | role_path |
- | users | ./support/roles/ |
- * the "users" role has been added to the "users" run list
- * the following databags have been updated:
- | databag | databag_path |
- | users | ./support/data_bags/users |
- * the chef-client has been run on "users"
- * I ssh to "users" with the following credentials:
- | username | keyfile |
- | root | ../.ssh/id_rsa |
-
- Scenario: The user has been removed
- * the following databags have been updated:
- | databag | databag_path |
- | users | ./support/data_bags/users-auto-remove |
- * the chef-client has been run on "users"
- When I run "cat /etc/passwd | grep [b]dobbs"
- Then I should not see "bdobbs" in the output
- And I should not see "/home/bdobbs" in the output
- And I should not see "/bin/bash" in the output
-
- Scenario: The user's group has been removed
- * the following databags have been updated:
- | databag | databag_path |
- | users | ./support/data_bags/users-auto-remove |
- * the chef-client has been run on "users"
- When I run "cat /etc/group | grep [b]dobbs"
- Then I should not see "bdobbs" in the output
- And I should not see "sysop" in the output
- And I should not see "dba" in the output
- And I should not see "dev" in the output
-
- Scenario: The user's directory has been preserved on remove
- * the following databags have been updated:
- | databag | databag_path |
- | users | ./support/data_bags/users-auto-remove |
- * the chef-client has been run on "users"
- When I run "[[ -e /home/bdobbs ]] && echo OK"
- Then I should see "OK" in the output
Please sign in to comment.
Something went wrong with that request. Please try again.