cuken 0.1.1 → 0.1.2
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/Gemfile +5 -3
- data/Gemfile.lock +61 -18
- data/LICENSE +13 -0
- data/NOTICE +3 -0
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/cucumber.yml +8 -0
- data/cuken.gemspec +397 -13
- data/examples/chef/features/support/env.rb +16 -0
- data/features/chef/cookbooks/cookbook.feature +14 -0
- data/features/chef/cookbooks/metadata.feature +40 -0
- data/features/chef/cookbooks/repo.feature +13 -0
- data/features/chef/knife.feature +140 -0
- data/features/chef/knife_steps.feature +19 -0
- data/features/command_steps.feature +68 -0
- data/features/commands.feature +5 -5
- data/features/common_steps.feature +13 -0
- data/features/data/Rakefile +38 -0
- data/features/data/apt/chef-integration-test-1.0/debian/changelog +5 -0
- data/features/data/apt/chef-integration-test-1.0/debian/compat +1 -0
- data/features/data/apt/chef-integration-test-1.0/debian/control +13 -0
- data/features/data/apt/chef-integration-test-1.0/debian/copyright +34 -0
- data/features/data/apt/chef-integration-test-1.0/debian/files +1 -0
- data/features/data/apt/chef-integration-test-1.0/debian/rules +13 -0
- data/features/data/apt/chef-integration-test-1.0/debian/source/format +1 -0
- data/features/data/apt/chef-integration-test-1.1/debian/changelog +11 -0
- data/features/data/apt/chef-integration-test-1.1/debian/compat +1 -0
- data/features/data/apt/chef-integration-test-1.1/debian/control +13 -0
- data/features/data/apt/chef-integration-test-1.1/debian/copyright +34 -0
- data/features/data/apt/chef-integration-test-1.1/debian/files +1 -0
- data/features/data/apt/chef-integration-test-1.1/debian/rules +13 -0
- data/features/data/apt/chef-integration-test-1.1/debian/source/format +1 -0
- data/features/data/apt/chef-integration-test_1.0-1_amd64.changes +22 -0
- data/features/data/apt/chef-integration-test_1.0-1_amd64.deb +0 -0
- data/features/data/apt/chef-integration-test_1.0.orig.tar.gz +0 -0
- data/features/data/apt/chef-integration-test_1.1-1_amd64.changes +22 -0
- data/features/data/apt/chef-integration-test_1.1-1_amd64.deb +0 -0
- data/features/data/apt/chef-integration-test_1.1.orig.tar.gz +0 -0
- data/features/data/apt/var/www/apt/conf/distributions +7 -0
- data/features/data/apt/var/www/apt/conf/incoming +4 -0
- data/features/data/apt/var/www/apt/conf/pulls +3 -0
- data/features/data/apt/var/www/apt/db/checksums.db +0 -0
- data/features/data/apt/var/www/apt/db/contents.cache.db +0 -0
- data/features/data/apt/var/www/apt/db/packages.db +0 -0
- data/features/data/apt/var/www/apt/db/references.db +0 -0
- data/features/data/apt/var/www/apt/db/release.caches.db +0 -0
- data/features/data/apt/var/www/apt/db/version +4 -0
- data/features/data/apt/var/www/apt/dists/sid/Release +19 -0
- data/features/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages +16 -0
- data/features/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages.gz +0 -0
- data/features/data/apt/var/www/apt/dists/sid/main/binary-amd64/Release +5 -0
- data/features/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.0-1_amd64.deb +0 -0
- data/features/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.1-1_amd64.deb +0 -0
- data/features/data/config/client.rb +23 -0
- data/features/data/config/client_with_checksum_caching.rb +23 -0
- data/features/data/config/knife-stephen.rb +12 -0
- data/features/data/config/knife.rb +11 -0
- data/features/data/config/rake.rb +57 -0
- data/features/data/config/server.rb +52 -0
- data/features/data/cookbook_tarballs/empty_tarball.tar.gz +0 -0
- data/features/data/cookbook_tarballs/new.tar.gz +0 -0
- data/features/data/cookbook_tarballs/not_a_tarball.txt +1 -0
- data/features/data/cookbook_tarballs/original.tar.gz +0 -0
- data/features/data/cookbooks/attribute_include/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_include/attributes/a.rb +4 -0
- data/features/data/cookbooks/attribute_include/attributes/b.rb +2 -0
- data/features/data/cookbooks/attribute_include/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_include/recipes/default.rb +23 -0
- data/features/data/cookbooks/attribute_include_default/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_include_default/attributes/a.rb +5 -0
- data/features/data/cookbooks/attribute_include_default/attributes/default.rb +2 -0
- data/features/data/cookbooks/attribute_include_default/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_include_default/recipes/default.rb +23 -0
- data/features/data/cookbooks/attribute_settings/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_settings/attributes/default.rb +3 -0
- data/features/data/cookbooks/attribute_settings/default.rb +1 -0
- data/features/data/cookbooks/attribute_settings/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_settings/recipes/default.rb +21 -0
- data/features/data/cookbooks/attribute_settings/recipes/default_in_recipe.rb +25 -0
- data/features/data/cookbooks/attribute_settings_normal/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_settings_normal/attributes/.default.rb.swo +0 -0
- data/features/data/cookbooks/attribute_settings_normal/attributes/default.rb +2 -0
- data/features/data/cookbooks/attribute_settings_normal/default.rb +1 -0
- data/features/data/cookbooks/attribute_settings_normal/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/.default.rb.swo +0 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/.default_in_recipe.rb.swo +0 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/default.rb +21 -0
- data/features/data/cookbooks/attribute_settings_normal/recipes/normal_in_recipe.rb +25 -0
- data/features/data/cookbooks/attribute_settings_override/README.rdoc +8 -0
- data/features/data/cookbooks/attribute_settings_override/attributes/default.rb +2 -0
- data/features/data/cookbooks/attribute_settings_override/default.rb +1 -0
- data/features/data/cookbooks/attribute_settings_override/metadata.rb +6 -0
- data/features/data/cookbooks/attribute_settings_override/recipes/default.rb +21 -0
- data/features/data/cookbooks/attribute_settings_override/recipes/normal_in_recipe.rb +25 -0
- data/features/data/cookbooks/attribute_settings_override/recipes/override_in_recipe.rb +21 -0
- data/features/data/cookbooks/delayed_notifications/recipes/bad_syntax_notifies.rb +14 -0
- data/features/data/cookbooks/delayed_notifications/recipes/default.rb +18 -0
- data/features/data/cookbooks/delayed_notifications/recipes/forward_references.rb +10 -0
- data/features/data/cookbooks/delayed_notifications/recipes/invalid_forward_reference.rb +16 -0
- data/features/data/cookbooks/delayed_notifications/recipes/notify_a_resource_from_a_single_source.rb +26 -0
- data/features/data/cookbooks/delayed_notifications/recipes/notify_a_resource_from_multiple_sources.rb +31 -0
- data/features/data/cookbooks/delayed_notifications/recipes/notify_different_resources_for_different_actions.rb +31 -0
- data/features/data/cookbooks/deploy/recipes/callbacks.rb +78 -0
- data/features/data/cookbooks/deploy/recipes/default.rb +51 -0
- data/features/data/cookbooks/deploy/recipes/deploy_commit1.rb +25 -0
- data/features/data/cookbooks/deploy/recipes/deploy_commit2.rb +25 -0
- data/features/data/cookbooks/deploy/recipes/embedded_recipe_callbacks.rb +70 -0
- data/features/data/cookbooks/deploy/recipes/revision_deploy.rb +51 -0
- data/features/data/cookbooks/deploy/recipes/rollback_commit2.rb +24 -0
- data/features/data/cookbooks/deploy/templates/default/app_config.yml.erb +23 -0
- data/features/data/cookbooks/deploy/templates/default/database.yml.erb +18 -0
- data/features/data/cookbooks/deploy/templates/default/embedded_recipe_before_symlink.rb.erb +4 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_after_restart_hook.rb.erb +4 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_before_migrate_hook.rb.erb +2 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_before_restart_hook.rb.erb +4 -0
- data/features/data/cookbooks/deploy/templates/default/sneaky_before_symlink_hook.rb.erb +2 -0
- data/features/data/cookbooks/directory_provider/recipes/create.rb +25 -0
- data/features/data/cookbooks/directory_provider/recipes/default.rb +18 -0
- data/features/data/cookbooks/directory_provider/recipes/delete.rb +29 -0
- data/features/data/cookbooks/directory_provider/recipes/delete_nonexistent.rb +23 -0
- data/features/data/cookbooks/directory_provider/recipes/owner_update.rb +31 -0
- data/features/data/cookbooks/directory_provider/recipes/set_the_accessibility_of_a_created_directory.rb +55 -0
- data/features/data/cookbooks/execute_commands/metadata.rb +5 -0
- data/features/data/cookbooks/execute_commands/recipes/4k.rb +25 -0
- data/features/data/cookbooks/execute_commands/recipes/debug.rb +22 -0
- data/features/data/cookbooks/execute_commands/recipes/default.rb +22 -0
- data/features/data/cookbooks/execute_commands/recipes/umask.rb +23 -0
- data/features/data/cookbooks/integration_setup/attributes/integration.rb +25 -0
- data/features/data/cookbooks/integration_setup/recipes/default.rb +24 -0
- data/features/data/cookbooks/lwrp/providers/default.rb +9 -0
- data/features/data/cookbooks/lwrp/providers/lwp_non_default.rb +3 -0
- data/features/data/cookbooks/lwrp/providers/lwp_overridden_load_current_resource.rb +8 -0
- data/features/data/cookbooks/lwrp/providers/provider_is_omitted.rb +3 -0
- data/features/data/cookbooks/lwrp/recipes/default_everything.rb +4 -0
- data/features/data/cookbooks/lwrp/recipes/non_default_provider.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/non_default_resource.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/overridden_provider_load_current_resource.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/overridden_resource_initialize.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_invokes_resource.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_a_class.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_a_string.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_a_symbol.rb +6 -0
- data/features/data/cookbooks/lwrp/recipes/provider_is_omitted.rb +3 -0
- data/features/data/cookbooks/lwrp/resources/default.rb +4 -0
- data/features/data/cookbooks/lwrp/resources/lwr_non_default.rb +3 -0
- data/features/data/cookbooks/lwrp/resources/lwr_overridden_initialize.rb +8 -0
- data/features/data/cookbooks/lwrp/resources/provider_is_omitted.rb +1 -0
- data/features/data/cookbooks/manage_files/recipes/create_a_file.rb +22 -0
- data/features/data/cookbooks/manage_files/recipes/default.rb +19 -0
- data/features/data/cookbooks/manage_files/recipes/delete_a_file.rb +24 -0
- data/features/data/cookbooks/manage_files/recipes/delete_a_file_that_does_not_already_exist.rb +22 -0
- data/features/data/cookbooks/manage_files/recipes/manage_file_contents.rb +23 -0
- data/features/data/cookbooks/manage_files/recipes/set_the_accessibility_of_a_created_file.rb +79 -0
- data/features/data/cookbooks/manage_files/recipes/set_the_owner_of_a_created_file.rb +23 -0
- data/features/data/cookbooks/manage_files/recipes/touch_a_file.rb +22 -0
- data/features/data/cookbooks/metadata/metadata.rb +17 -0
- data/features/data/cookbooks/metadata/recipes/default.rb +18 -0
- data/features/data/cookbooks/no_attributes/README.rdoc +8 -0
- data/features/data/cookbooks/no_attributes/metadata.rb +6 -0
- data/features/data/cookbooks/no_attributes/recipes/default.rb +21 -0
- data/features/data/cookbooks/node_cookbook_sync/README.rdoc +8 -0
- data/features/data/cookbooks/node_cookbook_sync/attributes/attr_file.rb +0 -0
- data/features/data/cookbooks/node_cookbook_sync/definitions/def_file.rb +0 -0
- data/features/data/cookbooks/node_cookbook_sync/libraries/lib_file.rb +0 -0
- data/features/data/cookbooks/node_cookbook_sync/metadata.rb +6 -0
- data/features/data/cookbooks/node_cookbook_sync/recipes/default.rb +18 -0
- data/features/data/cookbooks/packages/recipes/default.rb +0 -0
- data/features/data/cookbooks/packages/recipes/gem_package.rb +26 -0
- data/features/data/cookbooks/packages/recipes/install_apt_package.rb +3 -0
- data/features/data/cookbooks/packages/recipes/install_dpkg_package.rb +4 -0
- data/features/data/cookbooks/packages/recipes/install_gem_noshell.rb +26 -0
- data/features/data/cookbooks/packages/recipes/install_gem_package_twice.rb +26 -0
- data/features/data/cookbooks/packages/recipes/macports_install_bad_package.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_install_yydecode.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_purge_yydecode.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_remove_yydecode.rb +3 -0
- data/features/data/cookbooks/packages/recipes/macports_upgrade_yydecode.rb +7 -0
- data/features/data/cookbooks/packages/recipes/manually_upgrade_gem_package.rb +32 -0
- data/features/data/cookbooks/packages/recipes/upgrade_gem_noshell.rb +33 -0
- data/features/data/cookbooks/packages/recipes/upgrade_gem_package.rb +33 -0
- data/features/data/cookbooks/recipe_include/README.rdoc +8 -0
- data/features/data/cookbooks/recipe_include/metadata.rb +6 -0
- data/features/data/cookbooks/recipe_include/recipes/default.rb +21 -0
- data/features/data/cookbooks/recipe_include/recipes/second.rb +23 -0
- data/features/data/cookbooks/roles/recipes/default.rb +26 -0
- data/features/data/cookbooks/roles/recipes/env_test.rb +25 -0
- data/features/data/cookbooks/run_interval/recipes/default.rb +27 -0
- data/features/data/cookbooks/scm/metadata.rb +8 -0
- data/features/data/cookbooks/scm/recipes/git.rb +25 -0
- data/features/data/cookbooks/search/attributes/search_attrs.rb +1 -0
- data/features/data/cookbooks/search/recipes/default.rb +18 -0
- data/features/data/cookbooks/search/recipes/search_data.rb +28 -0
- data/features/data/cookbooks/search/recipes/search_data_manual.rb +33 -0
- data/features/data/cookbooks/search/recipes/search_data_noblock.rb +32 -0
- data/features/data/cookbooks/show_cookbook/README.rdoc +8 -0
- data/features/data/cookbooks/show_cookbook/attributes/attr_file.rb +0 -0
- data/features/data/cookbooks/show_cookbook/definitions/def_file.rb +0 -0
- data/features/data/cookbooks/show_cookbook/files/default/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/files/host-latte/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/files/mac_os_x-10.5/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/files/mac_os_x/prime_time.txt +0 -0
- data/features/data/cookbooks/show_cookbook/libraries/lib_file.rb +0 -0
- data/features/data/cookbooks/show_cookbook/metadata.rb +6 -0
- data/features/data/cookbooks/show_cookbook/recipes/default.rb +18 -0
- data/features/data/cookbooks/show_cookbook/templates/default/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/show_cookbook/templates/host-latte/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/show_cookbook/templates/mac_os_x-10.5/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/show_cookbook/templates/mac_os_x/prime_time.txt.erb +0 -0
- data/features/data/cookbooks/synchronize/recipes/default.rb +18 -0
- data/features/data/cookbooks/synchronize_deps/metadata.json +30 -0
- data/features/data/cookbooks/synchronize_deps/metadata.rb +1 -0
- data/features/data/cookbooks/synchronize_deps/recipes/default.rb +18 -0
- data/features/data/cookbooks/template/README.rdoc +8 -0
- data/features/data/cookbooks/template/metadata.rb +6 -0
- data/features/data/cookbooks/template/recipes/default.rb +26 -0
- data/features/data/cookbooks/template/recipes/interval.rb +37 -0
- data/features/data/cookbooks/template/recipes/render_node_attrs.rb +26 -0
- data/features/data/cookbooks/template/templates/default/node.txt.erb +3 -0
- data/features/data/cookbooks/template/templates/default/template.txt.erb +1 -0
- data/features/data/cookbooks/transfer_remote_directories/files/default/transfer_directory_feature/bar.txt +1 -0
- data/features/data/cookbooks/transfer_remote_directories/files/default/transfer_directory_feature/baz.txt +1 -0
- data/features/data/cookbooks/transfer_remote_directories/files/default/transfer_directory_feature/foo.txt +1 -0
- data/features/data/cookbooks/transfer_remote_directories/recipes/transfer_directory.rb +29 -0
- data/features/data/cookbooks/transfer_remote_files/files/default/transfer_a_file_from_a_cookbook.txt +1 -0
- data/features/data/cookbooks/transfer_remote_files/metadata.json +30 -0
- data/features/data/cookbooks/transfer_remote_files/metadata.rb +1 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/change_remote_file_perms_trickery.rb +33 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/default.rb +18 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/should_prefer_the_file_for_this_specific_host.rb +22 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/transfer_a_file_from_a_cookbook.rb +22 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/transfer_a_file_from_a_specific_cookbook.rb +20 -0
- data/features/data/cookbooks/transfer_remote_files/recipes/transfer_a_non-existent_file_from_a_cookbook.rb +22 -0
- data/features/data/cookbooks/transfer_remote_files_definition/definitions/transfer.rb +6 -0
- data/features/data/cookbooks/transfer_remote_files_definition/files/default/easy.txt +1 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/files/default/should_be_transferred.txt +3 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/files/default/should_not_be_transferred.txt +2 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/recipes/default.rb +26 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/templates/default/should_be_transferred.erb +2 -0
- data/features/data/cookbooks/transfer_some_cookbook_files/templates/default/should_not_be_transferred.erb +3 -0
- data/features/data/cookbooks/version_deps/metadata.rb +1 -0
- data/features/data/cookbooks/version_deps/recipes/default.rb +1 -0
- data/features/data/cookbooks/versions/metadata.rb +5 -0
- data/features/data/cookbooks/versions/recipes/default.rb +5 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_1.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_1.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_1.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_2.0.0/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_2.0.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_2.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_3.0.0/metadata.json +30 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_3.0.0/metadata.rb +7 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_a_3.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_1.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_1.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_1.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_2.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_2.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_2.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_3.0.0/metadata.json +30 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_3.0.0/metadata.rb +7 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_b_3.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_1.0.0/metadata.json +31 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_1.0.0/metadata.rb +8 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_1.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_2.0.0/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_2.0.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_2.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_3.0.0/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_3.0.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/dep_test_c_3.0.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/test_cookbook/attributes/attr1.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/test_cookbook/attributes/attr2.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/test_cookbook/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_empty_except_metadata/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_empty_except_metadata/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_nometadata/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_invalid_nometadata/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/metadata.json +40 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/metadata.rb +7 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.1.0_with_different_dependencies/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_valid_v0.2.0/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_wrong_metadata/metadata.json +40 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/testcookbook_wrong_metadata/recipes/default.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.1.1/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.10.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.10.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.10.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.2.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.0/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.0/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.0/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.7/metadata.json +39 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.7/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_test_0.9.7/recipes/default.rb +18 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/attributes/attributes.rb +1 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/metadata.json +29 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/metadata.rb +6 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/version_updated/recipes/default.rb +2 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/versions/metadata.json +38 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/versions/metadata.rb +5 -0
- data/features/data/cookbooks_not_uploaded_at_feature_start/versions/recipes/default.rb +5 -0
- data/features/data/gems/Marshal.4.8 +0 -0
- data/features/data/gems/Marshal.4.8.Z +0 -0
- data/features/data/gems/latest_specs.4.8 +0 -0
- data/features/data/gems/latest_specs.4.8.gz +0 -0
- data/features/data/gems/prerelease_specs.4.8 +0 -0
- data/features/data/gems/prerelease_specs.4.8.gz +0 -0
- data/features/data/gems/quick/Marshal.4.8/chef-integration-test-0.1.0.gemspec.rz +0 -0
- data/features/data/gems/quick/Marshal.4.8/chef-integration-test-0.1.1.gemspec.rz +0 -0
- data/features/data/gems/quick/chef-integration-test-0.1.0.gemspec.rz +0 -0
- data/features/data/gems/quick/chef-integration-test-0.1.1.gemspec.rz +0 -0
- data/features/data/gems/quick/index +2 -0
- data/features/data/gems/quick/index.rz +0 -0
- data/features/data/gems/quick/latest_index +1 -0
- data/features/data/gems/quick/latest_index.rz +0 -0
- data/features/data/gems/specs.4.8 +0 -0
- data/features/data/gems/specs.4.8.gz +0 -0
- data/features/data/gems/yaml +122 -0
- data/features/data/gems/yaml.Z +0 -0
- data/features/data/json_attribs/attribute_settings.json +3 -0
- data/features/data/json_attribs/json_runlist_and_attrs.json +4 -0
- data/features/data/myapp.bundle +0 -0
- data/features/data/node-load-test.rb +84 -0
- data/features/data/node-simple.rb +18 -0
- data/features/data/repositories/chef-repo/.gitignore +2 -0
- data/features/data/repositories/chef-repo/README.md +66 -0
- data/features/data/repositories/chef-repo/Rakefile +65 -0
- data/features/data/repositories/chef-repo/certificates/README.md +19 -0
- data/features/data/repositories/chef-repo/config/rake.rb +38 -0
- data/features/data/repositories/chef-repo/cookbooks/README.md +53 -0
- data/features/data/repositories/chef-repo/data_bags/README.md +23 -0
- data/features/data/repositories/chef-repo/roles/README.md +16 -0
- data/features/data/repositories/cookbooks/hosts/attributes/hosts.rb +1 -0
- data/features/data/repositories/cookbooks/hosts/cc.gemspec +36 -0
- data/features/data/repositories/cookbooks/hosts/metadata.json +41 -0
- data/features/data/repositories/cookbooks/hosts/metadata.rb +4 -0
- data/features/data/repositories/cookbooks/hosts/recipes/default.rb +6 -0
- data/features/data/repositories/cookbooks/hosts/templates/default/hosts.erb +27 -0
- data/features/data/search-tests/do_knife_search_test.rb +175 -0
- data/features/data/search-tests/search-test-nodes.rb +174 -0
- data/features/data/test_git_repo.tar.gz +0 -0
- data/features/file_steps.feature +70 -0
- data/features/files.feature +30 -16
- data/features/ssh.feature +2 -1
- data/features/ssh_steps.feature +20 -0
- data/features/step_definitions/cuken_steps.rb +10 -0
- data/features/support/env.rb +1 -0
- data/lib/cuken/api/chef.rb +115 -0
- data/lib/cuken/api/chef/common.rb +80 -0
- data/lib/cuken/api/file.rb +23 -3
- data/lib/cuken/chef.rb +3 -0
- data/lib/cuken/common.rb +0 -1
- data/lib/cuken/cucumber/chef.rb +16 -0
- data/lib/cuken/cucumber/chef/common.rb +68 -0
- data/lib/cuken/cucumber/chef/cookbook.rb +75 -0
- data/lib/cuken/cucumber/chef/cookbook_steps.rb +406 -0
- data/lib/cuken/cucumber/chef/deploy_steps.rb +84 -0
- data/lib/cuken/cucumber/chef/done_directory_steps.rb +41 -0
- data/lib/cuken/cucumber/chef/done_file_steps.rb +107 -0
- data/lib/cuken/cucumber/chef/done_knife_steps.rb +34 -0
- data/lib/cuken/cucumber/chef/fixture_steps.rb +413 -0
- data/lib/cuken/cucumber/chef/knife.rb +34 -0
- data/lib/cuken/cucumber/chef/node.rb +27 -0
- data/lib/cuken/cucumber/chef/node_steps.rb +88 -0
- data/lib/cuken/cucumber/chef/packages.rb +144 -0
- data/lib/cuken/cucumber/chef/pending_steps.rb +21 -0
- data/lib/cuken/cucumber/chef/recipe_steps.rb +23 -0
- data/lib/cuken/cucumber/chef/request_steps.rb +98 -0
- data/lib/cuken/cucumber/chef/response_steps.rb +233 -0
- data/lib/cuken/cucumber/chef/result_steps.rb +15 -0
- data/lib/cuken/cucumber/chef/run_client_steps.rb +260 -0
- data/lib/cuken/cucumber/chef/run_solo.rb +78 -0
- data/lib/cuken/cucumber/chef/sandbox_steps.rb +137 -0
- data/lib/cuken/cucumber/chef/search_steps.rb +70 -0
- data/lib/cuken/cucumber/chef/webrat_steps.rb +39 -0
- data/lib/cuken/cucumber/cmd.rb +18 -1
- data/lib/cuken/cucumber/common.rb +4 -0
- data/lib/cuken/cucumber/file.rb +25 -27
- data/lib/cuken/cucumber/ssh.rb +6 -6
- metadata +427 -27
- data/LICENSE.txt +0 -20
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'bundler'
|
|
2
|
+
begin
|
|
3
|
+
Bundler.setup(:default, :development)
|
|
4
|
+
rescue Bundler::BundlerError => e
|
|
5
|
+
$stderr.puts e.message
|
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
|
7
|
+
exit e.status_code
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
|
11
|
+
require 'cuken/ssh'
|
|
12
|
+
require 'cuken/cmd'
|
|
13
|
+
require 'cuken/file'
|
|
14
|
+
require 'cuken/chef'
|
|
15
|
+
|
|
16
|
+
require 'rspec/expectations'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@announce @work_in_cwd @cookbooks @cookbook_validity
|
|
2
|
+
Feature: Cookbook Validity
|
|
3
|
+
In order to understand cookbooks without evaluating them
|
|
4
|
+
As an Administrator
|
|
5
|
+
I want to automatically confirm cookbook existence and validity
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given a default base chef repository in "ckbk/scratch/myapp"
|
|
9
|
+
|
|
10
|
+
Scenario: Clone a cookbook repository
|
|
11
|
+
And the remote cookbook repository "features/data/repositories/cookbooks/hosts/.git"
|
|
12
|
+
When I clone the remote cookbook repository branch "master" to "tmp/aruba/ckbk/scratch/myapp/cookbooks/hosts"
|
|
13
|
+
Then the local cookbook repository exists
|
|
14
|
+
And the local cookbook "hosts" exists
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@announce @work_in_cwd @cookbooks @cookbook_metadata
|
|
2
|
+
Feature: Cookbook Metadata
|
|
3
|
+
In order to understand cookbooks without evaluating them
|
|
4
|
+
As an Administrator
|
|
5
|
+
I want to automatically generate metadata about cookbooks
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given a default base chef repository in "ckbk/scratch/myapp"
|
|
9
|
+
And the local chef repository exists
|
|
10
|
+
And a file named "ckbk/scratch/myapp/.chef/knife.rb" with:
|
|
11
|
+
"""
|
|
12
|
+
current_dir = File.dirname(__FILE__)
|
|
13
|
+
log_level :debug
|
|
14
|
+
log_location $stdout
|
|
15
|
+
node_name "bobo"
|
|
16
|
+
client_key "#{File.dirname(current_dir)}/bobo.pem"
|
|
17
|
+
chef_server_url "http://localhost:4000"
|
|
18
|
+
cache_type 'Memory'
|
|
19
|
+
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
|
|
20
|
+
cookbook_path ["#{current_dir}/../cookbooks","#{current_dir}/../site-cookbooks"]
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
And the remote cookbook repository "features/data/repositories/cookbooks/hosts/.git"
|
|
24
|
+
And I clone the remote cookbook repository branch "master" to "ckbk/scratch/myapp/cookbooks/hosts"
|
|
25
|
+
And the local cookbook repository exists
|
|
26
|
+
|
|
27
|
+
Scenario: Generate metadata for all cookbooks
|
|
28
|
+
When I successfully generate all cookbook metadata
|
|
29
|
+
And the output should contain "DEBUG: Generated "
|
|
30
|
+
And the output should not contain "DEBUG: No "
|
|
31
|
+
Then the file "ckbk/scratch/myapp/cookbooks/hosts/metadata.json" exists
|
|
32
|
+
|
|
33
|
+
Scenario: Generate metadata for a specific cookbook
|
|
34
|
+
When we record the a-mtime of "ckbk/scratch/myapp/cookbooks/hosts/metadata.json"
|
|
35
|
+
And I successfully generate cookbook "hosts" metadata
|
|
36
|
+
And the output should contain "DEBUG: Generated "
|
|
37
|
+
And the output should not contain "DEBUG: No "
|
|
38
|
+
Then the file "ckbk/scratch/myapp/cookbooks/hosts/metadata.json" exists
|
|
39
|
+
And the mtime of "ckbk/scratch/myapp/cookbooks/hosts/metadata.json" changes
|
|
40
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@announce @work_in_cwd @cookbooks @chef_repo
|
|
2
|
+
Feature: Base Chef repository for cookbooks
|
|
3
|
+
In order to have a Chef skeleton to build a custom deployment
|
|
4
|
+
As an Administrator
|
|
5
|
+
I want to automatically clone a generic base Chef repository
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given a directory named "ckbk/scratch"
|
|
9
|
+
|
|
10
|
+
Scenario: Clone a Chef skeleton repository
|
|
11
|
+
And the remote chef repository "features/data/repositories/chef-repo/.git"
|
|
12
|
+
When I clone the remote chef repository branch "master" to "tmp/aruba/ckbk/scratch/myapp"
|
|
13
|
+
Then the local chef repository exists
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#
|
|
2
|
+
# NOTE: This is an example of Cuken usage. Assuming:
|
|
3
|
+
# - A Chef server on localhost:4000 (point to yours)
|
|
4
|
+
# - An admin client named bobo exists on that Chef server
|
|
5
|
+
#
|
|
6
|
+
# If you wish to mock a Chef server, see the Chef project's
|
|
7
|
+
# features setup.
|
|
8
|
+
#
|
|
9
|
+
@announce @knife @steps
|
|
10
|
+
Feature: Reusable Chef Knife steps
|
|
11
|
+
In order to write Chef features describing post-convergence system integration
|
|
12
|
+
As a Chef user
|
|
13
|
+
I want to describe features without having to implement Knife steps
|
|
14
|
+
|
|
15
|
+
Background:
|
|
16
|
+
Given the Chef server URI "http://localhost:4000"
|
|
17
|
+
And the Chef admin client "bobo"
|
|
18
|
+
Given a directory named "foo/bar"
|
|
19
|
+
And a file named "foo/bar/bobo.pem" with:
|
|
20
|
+
"""
|
|
21
|
+
-----BEGIN RSA PRIVATE KEY-----
|
|
22
|
+
MIIEowIBAAKCAQEAumj8KuxHMNsIF00uMw2ZYfUj45vQD1OqhgjF2xAAlILMVeMP
|
|
23
|
+
xt+Xqq5bm2LS2zDbwK0lAWDAJTr/PHRPt9+4rMlYZt9bZWcLy/AeHHc3XePzaPIZ
|
|
24
|
+
Pctv7ja9Juom55PQRqmqviyw//9Usbnwx/9BAgPaq9lk3Cx0Ce+gRJLHkzXA0/bY
|
|
25
|
+
m68XTTtSkfdruruy0Y8qDSHEX++08xA0MYTp6EY+BiyECPntv8itp/DoRL+cDgAt
|
|
26
|
+
zuG0/Gn6EUMH2GGZ2K1bbA0l8xR8Jl+pE+w8teRWnJeuF1VxK6k0jnR8D7TzGJHc
|
|
27
|
+
xmg0O/UJf7f6CYVA7schABkZfu/LUcGXSImK9wIDAQABAoIBADSdYV+0JTvy9sus
|
|
28
|
+
6zdZxUtS5/hciFNrKByA6We1kpRYfthXKKLXhXWVlSG8uQtJNR2jQWisKE/Z4STt
|
|
29
|
+
J3sc2IFcq2kN7jwm47uCYN1kAOqtZozemKVKgKNaK/WJ7cU7gXQQe7MF5ke7h+pK
|
|
30
|
+
M14f+/dXoycSS1eh7HbJfhEc5Nv1ufpm+0anK+Ek1qKWVFSC5wrtMbnHb3TuIkE4
|
|
31
|
+
W7cUHWFtnf1p6ZGDROooAOpbPLO7pmbO1idt6lR12/DUP5vgd4WzyRitGt0ra3X9
|
|
32
|
+
htf12jMAaXVqAe1xKGFLi6p08CMTnv/7p/G+sK/HliBN4dpKMmhmFyDG1kEaXCIp
|
|
33
|
+
abUd5oECgYEA9WHNfEs24CMfvNxw5Rrz176BwbFHolnjY9XpqoCB5jN+RhXzM2IR
|
|
34
|
+
8r9jFwTGe7GucLB0DBOWh+8xNyPNtDleYggBWX36f85UFvpkvPwTAjvZHsgdHC4c
|
|
35
|
+
EjnWyzgz+GL2glKXnJed/eBejVFHnHvVOkWz15X1CZmDEQAeQmU/5tcCgYEAwnnt
|
|
36
|
+
DaECIYPxWaeBuYqP0AhyuvA/wHqb0HjsrS7spM1mvcyFDtcOMuSKFO4eEJW4Jybk
|
|
37
|
+
fxaMnJdrL7kPWjT5e8OP0dFsMiNyXD1gWl8/+CysaYsVFNa4QJo/ZZKVSTCGgDk4
|
|
38
|
+
8aOVyHB0KjLeDcf6aqe9aAr7amDrHoIqPT4wmOECgYA+x1HqLdgRSgsxp3hetSGT
|
|
39
|
+
ndLWukNofvTVMwJAM/aH7b6tsanyCHItF9gDKJ6bQN8vR4W5HT3S81g1Ejzrkg3a
|
|
40
|
+
qM+nlLqE/kW3R0KEsz0twiAPZwVDk2xtIU0Z2vw43SDSQM03K/co38FxCE149Jmd
|
|
41
|
+
+f1D98KkPRkyPUSAmiTaKwKBgHiH7L3nrlRrXCg+ww3lrOA4fDMUN87prqx0Zeuo
|
|
42
|
+
C47Qpv63RTg/XVN5hYMXWZbZ1DqfxjpmFVvwFMSNI9C6yG1GdVqLO02P3o8Akzkv
|
|
43
|
+
k4wS1ADN7JDvy15uuyAOy2uDIblSvdI1mt2RpM2KnUlZSgDUWXWkaNIzo0VTUy6F
|
|
44
|
+
3sTBAoGBAMCgw1dKF48GiKL5HYcwpbQrRneDX/l6w3sqNV8/UrzqJOm+elu/BT8y
|
|
45
|
+
g1sug7qgWqOJYytk2hgGeiB/IGZNsR9Tw+270xLaQlUoqtraDoh6liAdjA3f4BWu
|
|
46
|
+
9SJ/Of+9/IQ4lNXG36TAVUHnJ7hu5SGQkL3XUgNeotv1gCcZTvWW
|
|
47
|
+
-----END RSA PRIVATE KEY-----
|
|
48
|
+
"""
|
|
49
|
+
And a file named "foo/bar/.chef/knife.rb" with:
|
|
50
|
+
"""
|
|
51
|
+
current_dir = File.dirname(__FILE__)
|
|
52
|
+
log_level :debug
|
|
53
|
+
log_location $stdout
|
|
54
|
+
node_name "bobo"
|
|
55
|
+
client_key "#{File.dirname(current_dir)}/bobo.pem"
|
|
56
|
+
chef_server_url "http://localhost:4000"
|
|
57
|
+
cache_type 'Memory'
|
|
58
|
+
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
|
|
59
|
+
cookbook_path ["#{current_dir}/../cookbooks","#{current_dir}/../site-cookbooks"]
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
Scenario: Knife steps default knife.rb path
|
|
64
|
+
Given I cd to "foo/bar"
|
|
65
|
+
When I successfully run `knife node list`
|
|
66
|
+
When the output should contain:
|
|
67
|
+
"""
|
|
68
|
+
DEBUG: Using configuration from /usr/src/cuken/tmp/aruba/foo/bar/.chef/knife.rb
|
|
69
|
+
DEBUG: Signing the request as bobo
|
|
70
|
+
DEBUG: Sending HTTP Request via GET to localhost:4000/nodes
|
|
71
|
+
[
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
Scenario: Knife steps with path to knife.rb created earlier
|
|
75
|
+
Given the Knife file "foo/bar/.chef/knife.rb"
|
|
76
|
+
When I successfully run Knife's "node list"
|
|
77
|
+
When the output should contain:
|
|
78
|
+
"""
|
|
79
|
+
DEBUG: Using configuration from /usr/src/cuken/tmp/aruba/foo/bar/.chef/knife.rb
|
|
80
|
+
DEBUG: Signing the request as bobo
|
|
81
|
+
DEBUG: Sending HTTP Request via GET to localhost:4000/nodes
|
|
82
|
+
[
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
Scenario: Upload a cookbook with path to knife.rb created earlier
|
|
86
|
+
Given the Knife file "foo/bar/.chef/knife.rb"
|
|
87
|
+
And I cd to "./../../"
|
|
88
|
+
And a cookbook path "features/data/cookbooks_not_uploaded_at_feature_start"
|
|
89
|
+
When I successfully run Knife's "cookbook upload version_updated"
|
|
90
|
+
Then the output should contain:
|
|
91
|
+
"""
|
|
92
|
+
DEBUG: Signing the request as bobo
|
|
93
|
+
DEBUG: Sending HTTP Request via PUT to localhost:4000/cookbooks/version_updated/2.0.0
|
|
94
|
+
INFO: Upload complete!
|
|
95
|
+
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
Scenario: Verify a cookbook with path to knife.rb created earlier
|
|
99
|
+
Given the Knife file "foo/bar/.chef/knife.rb"
|
|
100
|
+
And I successfully run Knife's "cookbook show version_updated"
|
|
101
|
+
And the output should contain:
|
|
102
|
+
"""
|
|
103
|
+
DEBUG: Signing the request as bobo
|
|
104
|
+
DEBUG: Sending HTTP Request via GET to localhost:4000/cookbooks/version_updated
|
|
105
|
+
{
|
|
106
|
+
"version_updated": [
|
|
107
|
+
"2.0.0"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
Scenario: Delete a cookbook with path to knife.rb created earlier
|
|
114
|
+
Given the Knife file "foo/bar/.chef/knife.rb"
|
|
115
|
+
When I interactively run Knife's "cookbook delete version_updated"
|
|
116
|
+
And I type "Y"
|
|
117
|
+
And wait "5" seconds
|
|
118
|
+
Then the output should contain:
|
|
119
|
+
"""
|
|
120
|
+
DEBUG: Signing the request as bobo
|
|
121
|
+
DEBUG: Sending HTTP Request via GET to localhost:4000/cookbooks/version_updated
|
|
122
|
+
Do you really want to delete version_updated version 2.0.0? (Y/N) DEBUG: Signing the request as bobo
|
|
123
|
+
DEBUG: Sending HTTP Request via DELETE to localhost:4000/cookbooks/version_updated/2.0.0
|
|
124
|
+
Deleted cookbook[version_updated version 2.0.0]!
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
Scenario: Auto upload and Delete a cookbook with path to knife.rb created earlier
|
|
128
|
+
Given the Knife file "foo/bar/.chef/knife.rb"
|
|
129
|
+
And I cd to "./../../"
|
|
130
|
+
And a cookbook path "features/data/cookbooks_not_uploaded_at_feature_start"
|
|
131
|
+
When I successfully run Knife's "cookbook upload version_updated"
|
|
132
|
+
When I successfully run Knife's "cookbook delete version_updated 2.0.0"
|
|
133
|
+
Then the output should contain:
|
|
134
|
+
"""
|
|
135
|
+
DEBUG: Signing the request as bobo
|
|
136
|
+
DEBUG: Sending HTTP Request via GET to localhost:4000/cookbooks/version_updated
|
|
137
|
+
Do you really want to delete version_updated version 2.0.0? (Y/N) DEBUG: Signing the request as bobo
|
|
138
|
+
DEBUG: Sending HTTP Request via DELETE to localhost:4000/cookbooks/version_updated/2.0.0
|
|
139
|
+
Deleted cookbook[version_updated version 2.0.0]!
|
|
140
|
+
"""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@knife @cookbook_upload @knife_cookbook_upload
|
|
2
|
+
Feature: Upload Cookbooks with Knife
|
|
3
|
+
In order to use cookbooks I have written
|
|
4
|
+
As a knife user
|
|
5
|
+
I want to upload my cookbooks
|
|
6
|
+
|
|
7
|
+
Scenario: Uploading a new cookbook updates the metadata on the server
|
|
8
|
+
Given I am an administrator
|
|
9
|
+
When I upload the 'version' cookbook with knife
|
|
10
|
+
When I 'GET' to the path '/cookbooks/version_updated'
|
|
11
|
+
Then the inflated response should equal '{"version_updated"=>{"url"=>"http://127.0.0.1:4000/cookbooks/version_updated", "versions"=>[{"url"=>"http://127.0.0.1:4000/cookbooks/version_updated/2.0.0", "version"=>"2.0.0"}]}}'
|
|
12
|
+
|
|
13
|
+
@regression
|
|
14
|
+
Scenario: Uploading a new version updates the metadata on the server
|
|
15
|
+
Given I am an administrator
|
|
16
|
+
When I upload the 'version_updated' cookbook with knife
|
|
17
|
+
When I 'GET' to the path '/cookbooks/version_updated'
|
|
18
|
+
Then the inflated response should equal '{"version_updated"=>{"url"=>"http://127.0.0.1:4000/cookbooks/version_updated", "versions"=>[{"url"=>"http://127.0.0.1:4000/cookbooks/version_updated/2.0.0", "version"=>"2.0.0"}]}}'
|
|
19
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@step_features
|
|
2
|
+
Feature: Listing file steps
|
|
3
|
+
In order to test a running system
|
|
4
|
+
As an administrator
|
|
5
|
+
I want to know what command steps are available
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given that "cuken/cmd" has been required
|
|
9
|
+
|
|
10
|
+
Scenario: Command execution
|
|
11
|
+
Then these steps are defined for "cuken/cucumber/cmd.rb":
|
|
12
|
+
| step |
|
|
13
|
+
|I run `([^`]*)` |
|
|
14
|
+
|I run `([^`]*)` interactively |
|
|
15
|
+
|I successfully run `([^`]*)` |
|
|
16
|
+
|I type "([^"]*)" |
|
|
17
|
+
|
|
18
|
+
Scenario: Command exit status
|
|
19
|
+
Then these steps are defined for "cuken/cucumber/cmd.rb":
|
|
20
|
+
| step |
|
|
21
|
+
|the exit status should be (\d+) |
|
|
22
|
+
|the exit status should not be (\d+) |
|
|
23
|
+
# Pending:
|
|
24
|
+
# https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/707-element-size-differs-2-should-be-1-indexerror
|
|
25
|
+
# |it should (pass|fail) with: |
|
|
26
|
+
# |it should (pass|fail) with exactly: |
|
|
27
|
+
# |it should (pass|fail) with regexp?: |
|
|
28
|
+
|
|
29
|
+
Scenario: Command output (stdout+stderr)
|
|
30
|
+
Then these steps are defined for "cuken/cucumber/cmd.rb":
|
|
31
|
+
| step |
|
|
32
|
+
|the output from "(.*)" contains exactly: |
|
|
33
|
+
|the output from "([^"]*)" does not contain exactly: |
|
|
34
|
+
|the output from "([^"]*)" contains: |
|
|
35
|
+
|the output from "([^"]*)" does not contain: |
|
|
36
|
+
|the output from "([^"]*)" should contain "([^"]*)" |
|
|
37
|
+
|the output from "([^"]*)" should not contain "([^"]*)" |
|
|
38
|
+
|the output should contain "([^"]*)" |
|
|
39
|
+
|the output should contain: |
|
|
40
|
+
|the output should contain exactly "([^"]*)" |
|
|
41
|
+
|the output should contain exactly: |
|
|
42
|
+
|the output should match \/([^\/]*)\/ |
|
|
43
|
+
|the output should match: |
|
|
44
|
+
|the output should not contain "([^"]*)" |
|
|
45
|
+
|the output should not contain: |
|
|
46
|
+
|
|
47
|
+
Scenario: Command stderr
|
|
48
|
+
Then these steps are defined for "cuken/cucumber/cmd.rb":
|
|
49
|
+
| step |
|
|
50
|
+
|the stderr from "([^"]*)" should contain "([^"]*)" |
|
|
51
|
+
|the stderr from "([^"]*)" should not contain "([^"]*)" |
|
|
52
|
+
|the stderr should contain "([^"]*)" |
|
|
53
|
+
|the stderr should contain: |
|
|
54
|
+
|the stderr should contain exactly: |
|
|
55
|
+
|the stderr should not contain "([^"]*)" |
|
|
56
|
+
|the stderr should not contain: |
|
|
57
|
+
|
|
58
|
+
Scenario: Command stdout
|
|
59
|
+
Then these steps are defined for "cuken/cucumber/cmd.rb":
|
|
60
|
+
| step |
|
|
61
|
+
|the stdout from "([^"]*)" should contain "([^"]*)" |
|
|
62
|
+
|the stdout from "([^"]*)" should not contain "([^"]*)" |
|
|
63
|
+
|the stdout should contain "([^"]*)" |
|
|
64
|
+
|the stdout should contain: |
|
|
65
|
+
|the stdout should contain exactly: |
|
|
66
|
+
|the stdout should not contain "([^"]*)" |
|
|
67
|
+
|the stdout should not contain: |
|
|
68
|
+
|
data/features/commands.feature
CHANGED
|
@@ -10,15 +10,15 @@ Feature: Executing commands
|
|
|
10
10
|
Given that "cuken/cmd" has been required
|
|
11
11
|
|
|
12
12
|
Scenario: Check Stdout
|
|
13
|
-
When I run
|
|
13
|
+
When I run `echo 'i like cheese'`
|
|
14
14
|
Then the stdout from "echo 'i like cheese'" should contain "i like cheese"
|
|
15
15
|
|
|
16
16
|
Scenario: Check Stderr
|
|
17
|
-
When I run
|
|
17
|
+
When I run `some_error`
|
|
18
18
|
Then the stderr from "some_error" should contain "No such file or directory - some_error"
|
|
19
19
|
|
|
20
20
|
Scenario: Check Stdout for multiple lines
|
|
21
|
-
When I run
|
|
21
|
+
When I run `echo 'one\none\none\n'`
|
|
22
22
|
Then the output should contain:
|
|
23
23
|
"""
|
|
24
24
|
one
|
|
@@ -27,10 +27,10 @@ Feature: Executing commands
|
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
29
|
Scenario: Check exit code
|
|
30
|
-
When I run
|
|
30
|
+
When I run `true`
|
|
31
31
|
Then the exit status should be 0
|
|
32
32
|
|
|
33
33
|
Scenario: Check exit code
|
|
34
|
-
When I run
|
|
34
|
+
When I run `false`
|
|
35
35
|
Then the exit status should be 1
|
|
36
36
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@step_features
|
|
2
|
+
Feature: Listing common steps
|
|
3
|
+
In order to test a running system
|
|
4
|
+
As an administrator
|
|
5
|
+
I want to know what common steps are available
|
|
6
|
+
|
|
7
|
+
Background:
|
|
8
|
+
Given that "cuken/common" has been required
|
|
9
|
+
|
|
10
|
+
Scenario: Common execution
|
|
11
|
+
Then these steps are defined for "cuken/cucumber/common.rb":
|
|
12
|
+
| step |
|
|
13
|
+
|wait "([^"]*)" seconds |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Rakefile for Chef Server Repository
|
|
3
|
+
#
|
|
4
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
|
5
|
+
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
|
6
|
+
# License:: Apache License, Version 2.0
|
|
7
|
+
#
|
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
# you may not use this file except in compliance with the License.
|
|
10
|
+
# You may obtain a copy of the License at
|
|
11
|
+
#
|
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
#
|
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
# See the License for the specific language governing permissions and
|
|
18
|
+
# limitations under the License.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
$: << File.join(File.dirname(__FILE__), "..", "..", "chef", "lib")
|
|
22
|
+
|
|
23
|
+
require 'rubygems'
|
|
24
|
+
require 'chef'
|
|
25
|
+
require 'chef/json_compat'
|
|
26
|
+
|
|
27
|
+
# Make sure you have loaded constants first
|
|
28
|
+
require File.join(File.dirname(__FILE__), 'config', 'rake')
|
|
29
|
+
|
|
30
|
+
# And choosen a VCS
|
|
31
|
+
if File.directory?(File.join(TOPDIR, ".svn"))
|
|
32
|
+
$vcs = :svn
|
|
33
|
+
elsif File.directory?(File.join(TOPDIR, ".git"))
|
|
34
|
+
$vcs = :git
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
load 'chef/tasks/chef_repo.rake'
|
|
38
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Source: chef-integration-test
|
|
2
|
+
Section: ruby
|
|
3
|
+
Priority: extra
|
|
4
|
+
Maintainer: Joshua Timberman <Joshua Timberman <joshua@opscode.com>>
|
|
5
|
+
Build-Depends: debhelper (>= 7.0.50~)
|
|
6
|
+
Standards-Version: 3.8.4
|
|
7
|
+
Homepage: http://tickets.opscode.com
|
|
8
|
+
|
|
9
|
+
Package: chef-integration-test
|
|
10
|
+
Architecture: any
|
|
11
|
+
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
12
|
+
Description: Chef integration tests for APT in Cucumber
|
|
13
|
+
This package is used for cucumber integration testing in Chef.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
This work was packaged by:
|
|
2
|
+
|
|
3
|
+
Joshua Timberman <Joshua Timberman <joshua@opscode.com>> on Thu, 30 Sep 2010 09:53:45 -0600
|
|
4
|
+
|
|
5
|
+
Upstream Author(s):
|
|
6
|
+
|
|
7
|
+
Opscode, Inc.
|
|
8
|
+
|
|
9
|
+
Copyright:
|
|
10
|
+
|
|
11
|
+
Copyright (C) 2010 Opscode, Inc
|
|
12
|
+
|
|
13
|
+
License:
|
|
14
|
+
|
|
15
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
you may not use this file except in compliance with the License.
|
|
17
|
+
You may obtain a copy of the License at
|
|
18
|
+
|
|
19
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
|
|
21
|
+
Unless required by applicable law or agreed to in writing, software
|
|
22
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
23
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
24
|
+
See the License for the specific language governing permissions and
|
|
25
|
+
limitations under the License.
|
|
26
|
+
|
|
27
|
+
The Debian packaging is:
|
|
28
|
+
|
|
29
|
+
Copyright (C) 2010 Opscode, Inc (<legal@opscode.com>)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
and is licensed under the Apache 2.0 license.
|
|
33
|
+
|
|
34
|
+
See "/usr/share/common-licenses/Apache-2.0"
|