diff options
Diffstat (limited to 'features/provider')
-rw-r--r-- | features/provider/deploy/deploy.feature | 108 | ||||
-rw-r--r-- | features/provider/directory/create_directories.feature | 41 | ||||
-rw-r--r-- | features/provider/directory/delete_directories.feature | 21 | ||||
-rw-r--r-- | features/provider/execute/run_commands.feature | 45 | ||||
-rw-r--r-- | features/provider/file/manage_files.feature | 66 | ||||
-rw-r--r-- | features/provider/package/apt_package.feature | 19 | ||||
-rw-r--r-- | features/provider/package/dpkg_package.feature | 20 | ||||
-rw-r--r-- | features/provider/package/gem_package.feature | 48 | ||||
-rw-r--r-- | features/provider/package/macports.feature | 19 | ||||
-rw-r--r-- | features/provider/remote_directory/transfer_remote_directories.feature | 18 | ||||
-rw-r--r-- | features/provider/remote_file/transfer_remote_files.feature | 66 | ||||
-rw-r--r-- | features/provider/scm/git.feature | 31 | ||||
-rw-r--r-- | features/provider/template/template.feature | 31 |
13 files changed, 0 insertions, 533 deletions
diff --git a/features/provider/deploy/deploy.feature b/features/provider/deploy/deploy.feature deleted file mode 100644 index 66e71668a7..0000000000 --- a/features/provider/deploy/deploy.feature +++ /dev/null @@ -1,108 +0,0 @@ -@provider @git @deploy @provider_deploy - -Feature: Deploy - In order to repeatably and reliably deploy web apps from a source repository from the comfort of chef - As an OpsDev - I want to have automated deployments - - Scenario: Deploy an app for the first time - Given a validated node - And it includes the recipe 'deploy' - And I have a clone of the rails app in the data/tmp dir - And that I have 'rails' '2.3.4' installed - And that I have 'sqlite3-ruby' '1.2.5' installed - When I run the chef-client - Then the run should exit '0' - And a file named 'deploy/shared' should exist - And a file named 'deploy/shared/cached-copy/.git' should exist - And a file named 'deploy/current/app' should exist - And a file named 'deploy/current/config/database.yml' should exist - And a file named 'deploy/current/db/production.sqlite3' should exist - And a file named 'deploy/current/tmp/restart.txt' should exist - - Scenario: Deploy an app again - Given a validated node - And it includes the recipe 'deploy' - And I have a clone of the rails app in the data/tmp dir - And that I have 'rails' '2.3.4' installed - And that I have 'sqlite3-ruby' '1.2.5' installed - When I run the chef-client - And I run the chef-client again - And there should be 'two' releases - - Scenario: Deploy an app with custom layout attributes and callbacks - Given a validated node - And it includes the recipe 'deploy::callbacks' - And I have a clone of the rails app in the data/tmp dir - And that I have 'rails' '2.3.4' installed - And that I have 'sqlite3-ruby' '1.2.5' installed - When I run the chef-client - Then the run should exit '0' - And a callback named <callback_file> should exist - | before_migrate.rb | - | before_symlink.rb | - | before_restart.rb | - | after_restart.rb | - And the callback named <callback> should have run - | before_restart.rb | - | after_restart.rb | - - Scenario: Deploy an app with resources inside the callbacks (embedded recipes) - Given a validated node - And it includes the recipe 'deploy::embedded_recipe_callbacks' - And I have a clone of the rails app in the data/tmp dir - And that I have 'rails' '2.3.4' installed - And that I have 'sqlite3-ruby' '1.2.5' installed - When I run the chef-client - Then the run should exit '0' - And a file named 'deploy/current/app/before_symlink_was_here.txt' should exist - And a file named 'deploy/current/tmp/restart.txt' should exist - - Scenario: Deploy twice and rollback once using timestamped based deploy - Given a test git repo in the temp directory - And a validated node - And it includes the recipe 'deploy::deploy_commit1' - When I run the chef-client - Then the run should exit '0' - Then there should be 'one' release - When I remove 'recipe[deploy::deploy_commit1]' from the node's run list - And I add 'deploy::deploy_commit2' to the node's run list - And I run the chef-client - Then the run should exit '0' - Then there should be 'two' releases - When I remove 'recipe[deploy::deploy_commit2]' from the node's run list - And I add 'deploy::rollback_commit2' to the node's run list - And I run the chef-client - Then the run should exit '0' - Then there should be 'one' release - - Scenario: Make changes, commit them, deploy again using revision based strategy and do rollback - Given a validated node - And it includes the recipe 'deploy::revision_deploy' - And I have a clone of the rails app in the data/tmp dir - And that I have 'rails' '2.3.4' installed - And that I have 'sqlite3-ruby' '1.2.5' installed - And I run the chef-client - Then the run should exit '0' - When I make changes and do commit in rails app repo - And I run the chef-client - Then the run should exit '0' - And there should be 'two' releases - When I remove 'recipe[deploy::revision_deploy]' from the node's run list - And I add 'deploy::revision_rollback' to the node's run list - And I run the chef-client - Then the run should exit '0' - And current release revision should be "61e5cb77acb7400667df009ffef01306dcca4a07" - And there should be 'one' release - - Scenario: Deploy an app twice using the idempotent revision deploy strategy - Given a validated node - And it includes the recipe 'deploy::revision_deploy' - And I have a clone of the rails app in the data/tmp dir - And that I have 'rails' '2.3.4' installed - And that I have 'sqlite3-ruby' '1.2.5' installed - When I run the chef-client - And I run the chef-client at log level 'info' - Then the run should exit '0' - And there should be 'one' release - And the second chef run should have skipped deployment diff --git a/features/provider/directory/create_directories.feature b/features/provider/directory/create_directories.feature deleted file mode 100644 index c9587ae0bd..0000000000 --- a/features/provider/directory/create_directories.feature +++ /dev/null @@ -1,41 +0,0 @@ -@provider @provider_directory -Feature: Create Directories - In order to save time - As a Developer - I want to create directories - - Scenario: Create a directory - Given a validated node - And it includes the recipe 'directory_provider::create' - When I run the chef-client - Then the run should exit '0' - And a directory named 'isis' should exist - - Scenario: Set the owner of a created directory - Given a validated node - And it includes the recipe 'directory_provider::create' - When I run the chef-client - Then the run should exit '0' - And the directory named 'isis' should be owned by 'nobody' - - Scenario: Change the owner of a created directory - Given a validated node - And it includes the recipe 'directory_provider::owner_update' - When I run the chef-client - Then the run should exit '0' - And the directory named 'isis' should be owned by 'root' - - Scenario: Set the accessibility of a created directory - Given a validated node - And it includes the recipe 'directory_provider::set_the_accessibility_of_a_created_directory' - When I run the chef-client - Then the run should exit '0' - And the directory named 'octal0644' should have octal mode '0644' - And the directory named 'octal2644' should have octal mode '2644' - And the directory named 'decimal644' should have decimal mode '644' - And the directory named 'decimal2644' should have decimal mode '2644' - And the directory named 'string644' should have octal mode '644' - And the directory named 'string0644' should have octal mode '0644' - And the directory named 'string2644' should have octal mode '2644' - - diff --git a/features/provider/directory/delete_directories.feature b/features/provider/directory/delete_directories.feature deleted file mode 100644 index e98ec2140e..0000000000 --- a/features/provider/directory/delete_directories.feature +++ /dev/null @@ -1,21 +0,0 @@ -@provider @provider_directory -Feature: Delete Directories - In order to save time - As a Developer - I want to manage directories declaratively - - Scenario: Delete a directory - Given a validated node - And it includes the recipe 'directory_provider::delete' - When I run the chef-client at log level 'info' - Then the run should exit '0' - And a directory named 'particles' should not exist - And 'stdout' should have 'INFO: Deleting directory' - - Scenario: Delete a directory that already does not exist - Given a validated node - And it includes the recipe 'directory_provider::delete_nonexistent' - When I run the chef-client at log level 'info' - Then the run should exit '0' - And 'stdout' should not have 'INFO: Deleting directory' - diff --git a/features/provider/execute/run_commands.feature b/features/provider/execute/run_commands.feature deleted file mode 100644 index 28dd70482a..0000000000 --- a/features/provider/execute/run_commands.feature +++ /dev/null @@ -1,45 +0,0 @@ -@provider @provider_execute -Feature: Run Commands - In order to utilize the plethora of useful command line utilities - As a Developer - I want to execute commands from within chef - - Scenario: Execute a command - Given a validated node - And it includes the recipe 'execute_commands' - When I run the chef-client - Then the run should exit '0' - And a file named 'mastodon_rocks' should exist - - Scenario: Execute a command with umask value 777 - Given a validated node - And it includes the recipe 'execute_commands::umask' - When I run the chef-client - Then the run should exit '0' - And '/mastodon_rocks_umask' should exist and raise error when copying - - Scenario: Execute a command with client logging to file - Given a validated node - And it includes the recipe 'execute_commands' - When I run the chef-client with logging to the file 'silly-monkey.log' - Then the run should exit '0' - And a file named 'mastodon_rocks' should exist - - Scenario: Execute a command with more than 4k of output - Given a validated node - And it includes the recipe 'execute_commands::4k' - When I run the chef-client - Then the run should exit '0' - And a file named 'execute-4k.txt' should exist - - Scenario: Execute a command at the debug log level - Given a validated node - And it includes the recipe 'execute_commands::debug' - When I run the chef-client at log level 'debug' - Then the run should exit '0' - And 'stdout' should have 'DEBUG: Executing ruby -e .puts "whats up"; STDERR.puts "doc!".' - And 'stdout' should have 'DEBUG: ---- Begin output of ruby -e .puts "whats up"; STDERR.puts "doc!". ----' - And 'stdout' should have 'DEBUG: STDOUT: whats up' - And 'stdout' should have 'DEBUG: STDERR: doc!' - And 'stdout' should have 'DEBUG: ---- End output of ruby -e .puts "whats up"; STDERR.puts "doc!". ----' - And 'stdout' should have 'DEBUG: Ran ruby -e .puts "whats up"; STDERR.puts "doc!". returned 0' diff --git a/features/provider/file/manage_files.feature b/features/provider/file/manage_files.feature deleted file mode 100644 index f0df166985..0000000000 --- a/features/provider/file/manage_files.feature +++ /dev/null @@ -1,66 +0,0 @@ -@provider @provider_file -Feature: Manage Files - In order to save time - As a Developer - I want to manage files declaratively - - Scenario: Create a file - Given a validated node - And it includes the recipe 'manage_files::create_a_file' - When I run the chef-client - Then the run should exit '0' - And a file named 'create_a_file.txt' should exist - - Scenario: Set the owner of a created file - Given a validated node - And it includes the recipe 'manage_files::set_the_owner_of_a_created_file' - When I run the chef-client - Then the run should exit '0' - And the file named 'create_a_file.txt' should be owned by 'nobody' - - Scenario: Delete a file - Given a validated node - And it includes the recipe 'manage_files::delete_a_file' - When I run the chef-client - Then the run should exit '0' - And a file named 'create_a_file.txt' should not exist - - Scenario: Delete a file that already does not exist - Given a validated node - And it includes the recipe 'manage_files::delete_a_file_that_does_not_already_exist' - When I run the chef-client - Then the run should exit '0' - - Scenario: Touch a file - Given a validated node - And it includes the recipe 'manage_files::touch_a_file' - And we have an empty file named 'touch_test.txt' - And we have the atime/mtime of 'touch_test.txt' - When I run the chef-client - Then the run should exit '0' - And the atime of 'touch_test.txt' should be different - And the mtime of 'touch_test.txt' should be different - - Scenario: Set the accessibility of a created file - Given a validated node - And it includes the recipe 'manage_files::set_the_accessibility_of_a_created_file' - When I run the chef-client - Then the run should exit '0' - And the file named 'octal0111.txt' should have octal mode '0111' - And the file named 'octal0644.txt' should have octal mode '0644' - And the file named 'octal2644.txt' should have octal mode '2644' - And the file named 'decimal73.txt' should have decimal mode '73' - And the file named 'decimal644.txt' should have decimal mode '644' - And the file named 'decimal2644.txt' should have decimal mode '2644' - And the file named 'string111.txt' should have octal mode '111' - And the file named 'string644.txt' should have octal mode '644' - And the file named 'string0644.txt' should have octal mode '0644' - And the file named 'string2644.txt' should have octal mode '2644' - - Scenario: Set the contents of a file - Given a validated node - And it includes the recipe 'manage_files::manage_file_contents' - When I run the chef-client - Then the run should exit '0' - And a file named 'aqua_teen.txt' should contain 'I am using the e-photo plugin, you pop it on your back and go' - diff --git a/features/provider/package/apt_package.feature b/features/provider/package/apt_package.feature deleted file mode 100644 index 72f2e0cbab..0000000000 --- a/features/provider/package/apt_package.feature +++ /dev/null @@ -1,19 +0,0 @@ -@provider @package @apt -Feature: Install apt Packages from the Filesystem - In order to automate installation of software in apt repositories - As a Sysadmin - I want chef to install deb packages - - Scenario: Install an apt package using the package resource - Given I am running on a debian compatible OS - And my dpkg architecture is 'amd64' - And the apt server is running - And I have configured my apt sources for integration tests - And I have updated my apt cache - And a validated node - And it includes the recipe 'packages::install_apt_package' - When I run the chef-client with '-l debug' - Then the run should exit '0' - And the dpkg package 'chef-integration-test' should be installed - - diff --git a/features/provider/package/dpkg_package.feature b/features/provider/package/dpkg_package.feature deleted file mode 100644 index 482e498157..0000000000 --- a/features/provider/package/dpkg_package.feature +++ /dev/null @@ -1,20 +0,0 @@ -@provider @package @dpkg -Feature: Install deb Packages from the Filesystem - In order to automate installation of software distributed as deb packages - As a Sysadmin - I want chef to install deb packages - - Scenario: Install a deb package using the dpkg resource - Given I am running on a debian compatible OS - And my dpkg architecture is 'amd64' - And the deb package 'chef-integration-test_1.0' is available - And a validated node - And it includes the recipe 'packages::install_dpkg_package' - When I run the chef-client with '-l debug' - Then the run should exit '0' - And the dpkg package 'chef-integration-test' should be installed - - - - - diff --git a/features/provider/package/gem_package.feature b/features/provider/package/gem_package.feature deleted file mode 100644 index 457304aecf..0000000000 --- a/features/provider/package/gem_package.feature +++ /dev/null @@ -1,48 +0,0 @@ -@provider @package @rubygems -Feature: Gem package - In order to manage software and applications that require ruby gem packages - As an OpsDev - I want to install upgrade and remove rubygems - - Scenario: Installing a gem that is not installed - Given a validated node - And it includes the recipe 'packages::gem_package' - And the gems server is running - When I run the chef-client - Then the run should exit '0' - And the gem 'chef-integration-test' version '0.1.0' should be installed - - Scenario: Installing a gem using only the gems api - Given a validated node - And it includes the recipe 'packages::install_gem_noshell' - And the gems server is running - When I run the chef-client - Then the run should exit '0' - And the gem 'chef-integration-test' version '0.1.0' should be installed - - Scenario: Upgrading a gem to a newer version - Given a validated node - And it includes the recipe 'packages::upgrade_gem_package' - And the gems server is running - When I run the chef-client - Then the run should exit '0' - And the gem 'chef-integration-test' version '0.1.0' should be installed - And the gem 'chef-integration-test' version '0.1.1' should be installed - - Scenario: Upgrading a gem using only the gems api - Given a validated node - And it includes the recipe 'packages::upgrade_gem_noshell' - And the gems server is running - When I run the chef-client - Then the run should exit '0' - And the gem 'chef-integration-test' version '0.1.0' should be installed - And the gem 'chef-integration-test' version '0.1.1' should be installed - - Scenario: Upgrading a gem manually by specifying a different version - Given a validated node - And it includes the recipe 'packages::manually_upgrade_gem_package' - And the gems server is running - When I run the chef-client - Then the run should exit '0' - And the gem 'chef-integration-test' version '0.1.0' should be installed - And the gem 'chef-integration-test' version '0.1.1' should be installed diff --git a/features/provider/package/macports.feature b/features/provider/package/macports.feature deleted file mode 100644 index 50914ac3a5..0000000000 --- a/features/provider/package/macports.feature +++ /dev/null @@ -1,19 +0,0 @@ -@provider @package @macports -Feature: Macports integration - In order to easily manage my OS X machines - As a Developer - I want to manage packages installed on OS X machines - - Scenario Outline: OS X package management - Given that I have the MacPorts package system installed - When I run chef-solo with the '<recipe>' recipe - Then the run should exit '<exitcode>' - And there <should> be a binary on the path called '<binary>' - - Examples: - | recipe | binary | should | exitcode | - | packages::macports_install_yydecode | yydecode | should | 0 | - | packages::macports_remove_yydecode | yydecode | should not | 0 | - | packages::macports_upgrade_yydecode | yydecode | should | 0 | - | packages::macports_purge_yydecode | yydecode | should not | 0 | - | packages::macports_install_bad_package | fdsafdsa | should not | 1 | diff --git a/features/provider/remote_directory/transfer_remote_directories.feature b/features/provider/remote_directory/transfer_remote_directories.feature deleted file mode 100644 index c474a686bc..0000000000 --- a/features/provider/remote_directory/transfer_remote_directories.feature +++ /dev/null @@ -1,18 +0,0 @@ -@provider @remote_directory -Feature: Transfer remote directories - In order to install copies of many files to many hosts - As an OpsDev - I want to transfer directories from remote locations - - Scenario: Transfer a directory from a cookbook - Given a validated node - And it includes the recipe 'transfer_remote_directories::transfer_directory' - When I run the chef-client - Then the run should exit '0' - And a file named 'transfer_directory/foo.txt' should contain 'tyrantanic' - And a file named 'transfer_directory/bar.txt' should contain 'Space Manoeuvres stage 1' - And a file named 'transfer_directory/baz.txt' should contain 'micromega' - - - - diff --git a/features/provider/remote_file/transfer_remote_files.feature b/features/provider/remote_file/transfer_remote_files.feature deleted file mode 100644 index 9474698a13..0000000000 --- a/features/provider/remote_file/transfer_remote_files.feature +++ /dev/null @@ -1,66 +0,0 @@ -@provider @remote_file -Feature: Transfer Remote Files - In order to easily manage many systems at once - As a Developer - I want to manage the contents of files remotely - - Scenario: Transfer a file from a cookbook - Given a validated node - And it includes the recipe 'transfer_remote_files::transfer_a_file_from_a_cookbook' - When I run the chef-client - Then the run should exit '0' - And a file named 'transfer_a_file_from_a_cookbook.txt' should contain 'easy like sunday morning' - - Scenario: Scenario: Attempting to use a non-existent cookbook file causes an error - Given a validated node - And it includes the recipe 'transfer_remote_files::transfer_a_non-existent_file_from_a_cookbook' - When I run the chef-client - Then the run should exit '1' - And 'stdout' should have 'cookbook transfer_remote_files does not contain file files/transfer_a_non-existent_file_from_a_cookbook.txt' - - Scenario: Should prefer the file for this specific host - Given a validated node - And it includes the recipe 'transfer_remote_files::should_prefer_the_file_for_this_specific_host' - And the cookbook has a 'file' named 'host_specific.txt' in the 'host' specific directory - And the cookbook has a 'file' named 'host_specific.txt' in the 'platform-version' specific directory - And the cookbook has a 'file' named 'host_specific.txt' in the 'platform' specific directory - And the cookbook has a 'file' named 'host_specific.txt' in the 'default' specific directory - And I upload the cookbook - When I run the chef-client - Then the run should exit '0' - And a file named 'host_specific.txt' should be from the 'host' specific directory - - Scenario: Should prefer the file for the correct platform version - Given a validated node - And it includes the recipe 'transfer_remote_files::should_prefer_the_file_for_this_specific_host' - And the cookbook has a 'file' named 'host_specific.txt' in the 'platform-version' specific directory - And the cookbook has a 'file' named 'host_specific.txt' in the 'platform' specific directory - And the cookbook has a 'file' named 'host_specific.txt' in the 'default' specific directory - And I upload the cookbook - When I run the chef-client - Then the run should exit '0' - And a file named 'host_specific.txt' should be from the 'platform-version' specific directory - - Scenario: Should prefer the file for the correct platform - Given a validated node - And it includes the recipe 'transfer_remote_files::should_prefer_the_file_for_this_specific_host' - And the cookbook has a 'file' named 'host_specific.txt' in the 'platform' specific directory - And the cookbook has a 'file' named 'host_specific.txt' in the 'default' specific directory - And I upload the cookbook - When I run the chef-client - Then the run should exit '0' - And a file named 'host_specific.txt' should be from the 'platform' specific directory - - Scenario: Transfer a file from a specific cookbook - Given a validated node - And it includes the recipe 'transfer_remote_files::transfer_a_file_from_a_specific_cookbook' - When I run the chef-client - Then the run should exit '0' - And a file named 'from_definition.txt' should contain 'easy like saturday morning' - - Scenario: Change permissions for a pre-existing remote_file - Given a validated node - And it includes the recipe 'transfer_remote_files::change_remote_file_perms_trickery' - When I run the chef-client - Then the run should exit '0' - And the file named 'transfer_a_file_from_a_cookbook.txt' should have octal mode '0644' diff --git a/features/provider/scm/git.feature b/features/provider/scm/git.feature deleted file mode 100644 index f0ff2a1e04..0000000000 --- a/features/provider/scm/git.feature +++ /dev/null @@ -1,31 +0,0 @@ -@provider @git - -Feature: Git - In order to use files stored in git so I can deploy apps and use edge versions of software - As a Developer - I want to clone and update git repositories - - Scenario: Clone a git repo - Given a test git repo in the temp directory - And a validated node - And it includes the recipe 'scm::git' - When I run the chef-client - Then the run should exit '0' - And a file named 'gitchef/.git' should exist - And a file named 'gitchef/what_revision_am_i' should exist - - Scenario: Clone a git repo with additional repositories - Given a test git repo in the temp directory - And a validated node - And it includes the recipe 'scm::git-remotes' - When I run the chef-client - Then the run should exit '0' - And a remote repository named 'hi' should exist in 'gitchef2' - And a remote repository named 'lo' should exist in 'gitchef2' - And a remote repository named 'waugh' should exist in 'gitchef2' - When I remove the remote repository named 'lo' from 'gitchef2' - And I run the chef-client again - Then the run should exit '0' - And a remote repository named 'hi' should exist in 'gitchef2' - And a remote repository named 'lo' should exist in 'gitchef2' - And a remote repository named 'waugh' should exist in 'gitchef2' diff --git a/features/provider/template/template.feature b/features/provider/template/template.feature deleted file mode 100644 index 684f1cc499..0000000000 --- a/features/provider/template/template.feature +++ /dev/null @@ -1,31 +0,0 @@ -@provider @template -Feature: Templates - In order to easily manage many systems at once - As a Developer - I want to manage the contents of files programatically - - Scenario: Render a template from a cookbook - Given a validated node - And it includes the recipe 'template' - When I run the chef-client - Then the run should exit '0' - And a file named 'template.txt' should contain 'sauce' - - Scenario: Render a template accessing the node directly - Given a validated node - And it includes the recipe 'template::render_node_attrs' - When I run the chef-client - Then the run should exit '0' - And a file named 'node.txt' should contain 'bawt is fujins bot' - And a file named 'node.txt' should contain 'cheers!' - -# Read the JIRA ticket for the full story, but what we're testing is that the -# template resource executes correctly the second time it's run in the same -# chef process - @regression @chef_1384 - Scenario: Render a template twice running as a daemon - Given a validated node - And it includes the recipe 'template::interval' - When I run the chef-client for no more than '30' seconds - Then the run should exit '108' - And a file named 'template.txt' should contain 'two' |