chefspec 5.0.0 → 5.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +425 -371
- data/examples/apt_package/recipes/purge.rb +2 -2
- data/examples/apt_package/recipes/reconfig.rb +2 -2
- data/examples/apt_package/recipes/remove.rb +2 -2
- data/examples/apt_package/recipes/upgrade.rb +2 -2
- data/examples/apt_package/spec/install_spec.rb +4 -1
- data/examples/apt_package/spec/purge_spec.rb +4 -1
- data/examples/apt_package/spec/reconfig_spec.rb +4 -1
- data/examples/apt_package/spec/remove_spec.rb +4 -1
- data/examples/apt_package/spec/upgrade_spec.rb +4 -1
- data/examples/apt_repository/spec/add_spec.rb +4 -1
- data/examples/apt_repository/spec/remove_spec.rb +4 -1
- data/examples/apt_update/recipes/periodic.rb +1 -1
- data/examples/apt_update/spec/periodic_spec.rb +5 -2
- data/examples/apt_update/spec/update_spec.rb +4 -1
- data/examples/attributes/spec/default_spec.rb +1 -1
- data/examples/batch/spec/run_spec.rb +4 -6
- data/examples/cached/spec/default_spec.rb +1 -1
- data/examples/chef_gem/spec/install_spec.rb +1 -1
- data/examples/chef_gem/spec/purge_spec.rb +1 -1
- data/examples/chef_gem/spec/reconfig_spec.rb +1 -1
- data/examples/chef_gem/spec/remove_spec.rb +1 -1
- data/examples/chef_gem/spec/upgrade_spec.rb +1 -1
- data/examples/chocolatey_package/spec/install_spec.rb +4 -6
- data/examples/chocolatey_package/spec/remove_spec.rb +4 -6
- data/examples/chocolatey_package/spec/upgrade_spec.rb +4 -6
- data/examples/compile_time/spec/default_spec.rb +1 -1
- data/examples/cookbook_file/spec/create_if_missing_spec.rb +3 -3
- data/examples/cookbook_file/spec/create_spec.rb +3 -3
- data/examples/cookbook_file/spec/delete_spec.rb +1 -1
- data/examples/cookbook_file/spec/touch_spec.rb +1 -1
- data/examples/cron/spec/create_spec.rb +1 -1
- data/examples/cron/spec/delete_spec.rb +1 -1
- data/examples/custom_matcher/providers/thing.rb +1 -1
- data/examples/custom_matcher/spec/install_spec.rb +1 -1
- data/examples/custom_matcher/spec/remove_spec.rb +1 -1
- data/examples/deploy/spec/deploy_spec.rb +1 -1
- data/examples/deploy/spec/force_deploy_spec.rb +1 -1
- data/examples/deploy/spec/rollback_spec.rb +1 -1
- data/examples/directory/spec/create_spec.rb +4 -4
- data/examples/directory/spec/delete_spec.rb +3 -3
- data/examples/do_nothing/spec/default_spec.rb +1 -1
- data/examples/dpkg_package/spec/install_spec.rb +4 -6
- data/examples/dpkg_package/spec/purge_spec.rb +4 -6
- data/examples/dpkg_package/spec/remove_spec.rb +4 -6
- data/examples/dsc_resource/recipes/{default.rb → run.rb} +6 -6
- data/examples/dsc_resource/spec/{default_spec.rb → run_spec.rb} +5 -7
- data/examples/dsc_script/recipes/run.rb +12 -0
- data/examples/dsc_script/spec/run_spec.rb +16 -0
- data/examples/easy_install_package/spec/install_spec.rb +1 -1
- data/examples/easy_install_package/spec/purge_spec.rb +1 -1
- data/examples/easy_install_package/spec/remove_spec.rb +1 -1
- data/examples/easy_install_package/spec/upgrade_spec.rb +1 -1
- data/examples/env/spec/create_spec.rb +4 -6
- data/examples/env/spec/delete_spec.rb +4 -6
- data/examples/env/spec/modify_spec.rb +4 -6
- data/examples/erl_call/spec/run_spec.rb +1 -1
- data/examples/execute/spec/run_spec.rb +1 -1
- data/examples/expect_exception/spec/compile_error_spec.rb +1 -1
- data/examples/expect_exception/spec/converge_error_spec.rb +1 -1
- data/examples/expect_exception/spec/no_error_spec.rb +1 -1
- data/examples/file/spec/create_if_missing_spec.rb +3 -3
- data/examples/file/spec/create_spec.rb +3 -3
- data/examples/file/spec/delete_spec.rb +1 -1
- data/examples/file/spec/touch_spec.rb +1 -1
- data/examples/freebsd_package/spec/install_spec.rb +4 -1
- data/examples/freebsd_package/spec/remove_spec.rb +4 -1
- data/examples/gem_package/spec/install_spec.rb +1 -1
- data/examples/gem_package/spec/purge_spec.rb +1 -1
- data/examples/gem_package/spec/reconfig_spec.rb +1 -1
- data/examples/gem_package/spec/remove_spec.rb +1 -1
- data/examples/gem_package/spec/upgrade_spec.rb +1 -1
- data/examples/git/spec/checkout_spec.rb +1 -1
- data/examples/git/spec/export_spec.rb +1 -1
- data/examples/git/spec/sync_spec.rb +1 -1
- data/examples/group/spec/create_spec.rb +1 -1
- data/examples/group/spec/manage_spec.rb +1 -1
- data/examples/group/spec/modify_spec.rb +1 -1
- data/examples/group/spec/remove_spec.rb +1 -1
- data/examples/guards/spec/default_spec.rb +1 -1
- data/examples/heavy_provider_light_resource/libraries/resource_service.rb +1 -1
- data/examples/heavy_provider_light_resource/recipes/default.rb +1 -2
- data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +2 -2
- data/examples/http_request/spec/delete_spec.rb +1 -1
- data/examples/http_request/spec/get_spec.rb +1 -1
- data/examples/http_request/spec/head_spec.rb +1 -1
- data/examples/http_request/spec/options_spec.rb +1 -1
- data/examples/http_request/spec/post_spec.rb +1 -1
- data/examples/http_request/spec/put_spec.rb +1 -1
- data/examples/ifconfig/spec/add_spec.rb +1 -1
- data/examples/ifconfig/spec/delete_spec.rb +1 -1
- data/examples/ifconfig/spec/disable_spec.rb +1 -1
- data/examples/ifconfig/spec/enable_spec.rb +1 -1
- data/examples/include_recipe/spec/default_spec.rb +1 -1
- data/examples/ips_package/spec/install_spec.rb +4 -6
- data/examples/ips_package/spec/remove_spec.rb +4 -6
- data/examples/ips_package/spec/upgrade_spec.rb +4 -6
- data/examples/link/spec/create_spec.rb +1 -1
- data/examples/link/spec/delete_spec.rb +1 -1
- data/examples/link/spec/link_to_spec.rb +1 -1
- data/examples/log/spec/write_spec.rb +1 -1
- data/examples/macports_package/spec/install_spec.rb +1 -1
- data/examples/macports_package/spec/purge_spec.rb +1 -1
- data/examples/macports_package/spec/remove_spec.rb +1 -1
- data/examples/macports_package/spec/upgrade_spec.rb +1 -1
- data/examples/mdadm/spec/assemble_spec.rb +1 -1
- data/examples/mdadm/spec/create_spec.rb +1 -1
- data/examples/mdadm/spec/stop_spec.rb +1 -1
- data/examples/mount/spec/disable_spec.rb +1 -1
- data/examples/mount/spec/enable_spec.rb +1 -1
- data/examples/mount/spec/mount_spec.rb +1 -1
- data/examples/mount/spec/remount_spec.rb +1 -1
- data/examples/mount/spec/umount_spec.rb +1 -1
- data/examples/multiple_actions/spec/default_spec.rb +1 -1
- data/examples/multiple_actions/spec/sequential_spec.rb +2 -2
- data/examples/multiple_run_action/recipes/default.rb +2 -2
- data/examples/multiple_run_action/spec/default_spec.rb +1 -1
- data/examples/notifications/spec/before_spec.rb +1 -1
- data/examples/notifications/spec/chained_spec.rb +1 -1
- data/examples/notifications/spec/default_spec.rb +1 -1
- data/examples/notifications/spec/delayed_spec.rb +1 -1
- data/examples/notifications/spec/immediately_spec.rb +1 -1
- data/examples/ohai/spec/reload_spec.rb +1 -1
- data/examples/package/recipes/install.rb +1 -1
- data/examples/package/recipes/purge.rb +1 -1
- data/examples/package/recipes/reconfig.rb +1 -1
- data/examples/package/recipes/remove.rb +1 -1
- data/examples/package/recipes/upgrade.rb +1 -1
- data/examples/package/spec/install_spec.rb +2 -2
- data/examples/package/spec/purge_spec.rb +2 -2
- data/examples/package/spec/reconfig_spec.rb +2 -2
- data/examples/package/spec/remove_spec.rb +2 -2
- data/examples/package/spec/upgrade_spec.rb +2 -2
- data/examples/pacman_package/spec/install_spec.rb +4 -6
- data/examples/pacman_package/spec/purge_spec.rb +4 -6
- data/examples/pacman_package/spec/remove_spec.rb +4 -6
- data/examples/pacman_package/spec/upgrade_spec.rb +4 -6
- data/examples/portage_package/spec/install_spec.rb +4 -1
- data/examples/portage_package/spec/purge_spec.rb +4 -1
- data/examples/portage_package/spec/remove_spec.rb +4 -1
- data/examples/portage_package/spec/upgrade_spec.rb +4 -1
- data/examples/powershell_script/spec/run_spec.rb +4 -6
- data/examples/reboot/spec/cancel_spec.rb +1 -2
- data/examples/reboot/spec/now_spec.rb +1 -2
- data/examples/reboot/spec/request_spec.rb +1 -2
- data/examples/registry_key/spec/create_if_missing_spec.rb +4 -1
- data/examples/registry_key/spec/create_spec.rb +4 -1
- data/examples/registry_key/spec/delete_key_spec.rb +4 -1
- data/examples/registry_key/spec/delete_spec.rb +4 -1
- data/examples/remote_directory/spec/create_if_missing_spec.rb +1 -1
- data/examples/remote_directory/spec/create_spec.rb +1 -1
- data/examples/remote_directory/spec/delete_spec.rb +1 -1
- data/examples/remote_file/spec/create_if_missing_spec.rb +1 -1
- data/examples/remote_file/spec/create_spec.rb +1 -1
- data/examples/remote_file/spec/delete_spec.rb +1 -1
- data/examples/remote_file/spec/touch_spec.rb +1 -1
- data/examples/render_file/spec/default_spec.rb +1 -1
- data/examples/render_file/spec/template_helpers_spec.rb +1 -1
- data/examples/roles/roles/role.rb +3 -3
- data/examples/route/spec/add_spec.rb +1 -1
- data/examples/route/spec/delete_spec.rb +1 -1
- data/examples/rpm_package/spec/install_spec.rb +4 -6
- data/examples/rpm_package/spec/remove_spec.rb +4 -6
- data/examples/rpm_package/spec/upgrade_spec.rb +4 -6
- data/examples/ruby_block/spec/run_spec.rb +1 -1
- data/examples/script/spec/run_bash_spec.rb +1 -1
- data/examples/script/spec/run_csh_spec.rb +1 -1
- data/examples/script/spec/run_perl_spec.rb +1 -1
- data/examples/script/spec/run_python_spec.rb +1 -1
- data/examples/script/spec/run_ruby_spec.rb +1 -1
- data/examples/script/spec/run_script_spec.rb +1 -1
- data/examples/server/spec/client_spec.rb +2 -2
- data/examples/server/spec/environment_spec.rb +1 -1
- data/examples/server/spec/node_spec.rb +4 -4
- data/examples/server/spec/role_spec.rb +1 -1
- data/examples/service/recipes/disable.rb +1 -1
- data/examples/service/recipes/enable.rb +1 -1
- data/examples/service/recipes/reload.rb +1 -1
- data/examples/service/recipes/restart.rb +1 -1
- data/examples/service/recipes/start.rb +1 -1
- data/examples/service/recipes/stop.rb +1 -1
- data/examples/service/spec/disable_spec.rb +1 -1
- data/examples/service/spec/enable_spec.rb +1 -1
- data/examples/service/spec/reload_spec.rb +1 -1
- data/examples/service/spec/restart_spec.rb +1 -1
- data/examples/service/spec/start_spec.rb +1 -1
- data/examples/service/spec/stop_spec.rb +1 -1
- data/examples/smartos_package/spec/install_spec.rb +4 -1
- data/examples/smartos_package/spec/remove_spec.rb +4 -1
- data/examples/smartos_package/spec/upgrade_spec.rb +4 -1
- data/examples/solaris_package/spec/install_spec.rb +4 -1
- data/examples/solaris_package/spec/remove_spec.rb +4 -1
- data/examples/state_attrs/providers/lwrp.rb +0 -1
- data/examples/state_attrs/spec/default_spec.rb +1 -1
- data/examples/step_into/spec/default_spec.rb +4 -4
- data/examples/stub_command/spec/default_spec.rb +3 -3
- data/examples/stub_data_bag/spec/default_spec.rb +2 -2
- data/examples/stub_data_bag_item/spec/default_spec.rb +4 -4
- data/examples/stub_search/spec/default_spec.rb +4 -4
- data/examples/subscribes/spec/before_spec.rb +1 -1
- data/examples/subscribes/spec/chained_spec.rb +1 -1
- data/examples/subscribes/spec/default_spec.rb +1 -2
- data/examples/subscribes/spec/delayed_spec.rb +1 -1
- data/examples/subscribes/spec/immediately_spec.rb +1 -1
- data/examples/subversion/spec/checkout_spec.rb +1 -1
- data/examples/subversion/spec/export_spec.rb +1 -1
- data/examples/subversion/spec/force_export_spec.rb +1 -1
- data/examples/subversion/spec/sync_spec.rb +1 -1
- data/examples/template/spec/create_if_missing_spec.rb +3 -3
- data/examples/template/spec/create_spec.rb +3 -3
- data/examples/template/spec/delete_spec.rb +1 -1
- data/examples/template/spec/touch_spec.rb +1 -1
- data/examples/use_inline_resources/spec/default_spec.rb +3 -3
- data/examples/user/spec/create_spec.rb +4 -1
- data/examples/user/spec/lock_spec.rb +4 -1
- data/examples/user/spec/manage_spec.rb +4 -1
- data/examples/user/spec/modify_spec.rb +4 -1
- data/examples/user/spec/remove_spec.rb +4 -1
- data/examples/user/spec/unlock_spec.rb +4 -1
- data/examples/windows_package/spec/install_spec.rb +4 -6
- data/examples/windows_package/spec/remove_spec.rb +4 -6
- data/examples/windows_service/spec/configure_startup_spec.rb +4 -6
- data/examples/windows_service/spec/disable_spec.rb +4 -6
- data/examples/windows_service/spec/enable_spec.rb +4 -6
- data/examples/windows_service/spec/reload_spec.rb +4 -6
- data/examples/windows_service/spec/restart_spec.rb +4 -6
- data/examples/windows_service/spec/start_spec.rb +4 -6
- data/examples/windows_service/spec/stop_spec.rb +4 -6
- data/examples/yum_package/spec/install_spec.rb +4 -1
- data/examples/yum_package/spec/purge_spec.rb +4 -1
- data/examples/yum_package/spec/remove_spec.rb +4 -1
- data/examples/yum_package/spec/upgrade_spec.rb +4 -1
- data/examples/yum_repository/recipes/create.rb +8 -0
- data/examples/yum_repository/recipes/make_cache.rb +3 -0
- data/examples/yum_repository/recipes/remove.rb +3 -0
- data/examples/yum_repository/spec/create_spec.rb +17 -0
- data/examples/yum_repository/spec/make_cache_spec.rb +12 -0
- data/examples/yum_repository/spec/remove_spec.rb +12 -0
- data/features/apt_repository.feature +21 -0
- data/features/apt_update.feature +19 -0
- data/features/dsc_resource.feature +5 -2
- data/features/dsc_script.feature +10 -0
- data/features/yum_repository.feature +27 -0
- data/lib/chefspec/api.rb +4 -0
- data/lib/chefspec/api/dsc_script.rb +37 -0
- data/lib/chefspec/api/yum_repository.rb +80 -0
- data/lib/chefspec/version.rb +1 -1
- metadata +23 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'gem_package::install' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'installs a gem_package with the default action' do
|
|
7
7
|
expect(chef_run).to install_gem_package('default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'gem_package::purge' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'purges a gem_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to purge_gem_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'gem_package::reconfig' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'reconfigs a gem_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to reconfig_gem_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'gem_package::remove' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'removes a gem_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to remove_gem_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'gem_package::upgrade' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'upgrades a gem_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to upgrade_gem_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'git::checkout' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'checkouts a git with an explicit action' do
|
|
7
7
|
expect(chef_run).to checkout_git('/tmp/explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'git::export' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'exports a git with an explicit action' do
|
|
7
7
|
expect(chef_run).to export_git('/tmp/explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'git::sync' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'syncs a git with the default action' do
|
|
7
7
|
expect(chef_run).to sync_git('/tmp/default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'group::create' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'creates a group with the default action' do
|
|
7
7
|
expect(chef_run).to create_group('default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'group::manage' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'manages a group with an explicit action' do
|
|
7
7
|
expect(chef_run).to manage_group('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'group::modify' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'modifies a group with an explicit action' do
|
|
7
7
|
expect(chef_run).to modify_group('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'group::remove' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'removes a group with an explicit action' do
|
|
7
7
|
expect(chef_run).to remove_group('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'guards::default' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'includes resource that have guards that evalute to true' do
|
|
7
7
|
expect(chef_run).to start_service('true_guard')
|
|
@@ -4,7 +4,7 @@ class ::Chef
|
|
|
4
4
|
class Resource
|
|
5
5
|
class HeavyProviderLightResourceService < ::Chef::Resource::Service
|
|
6
6
|
attr_accessor :root
|
|
7
|
-
def initialize(service_name, run_context=nil)
|
|
7
|
+
def initialize(service_name, run_context = nil)
|
|
8
8
|
super
|
|
9
9
|
@resource_name = :mixed_resource
|
|
10
10
|
@action = :configure
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require_relative '../libraries/resource_service'
|
|
2
2
|
|
|
3
3
|
describe 'heavy_provider_light_resource::default' do
|
|
4
|
-
it
|
|
5
|
-
ChefSpec::
|
|
4
|
+
it 'does not bomb (because the resource was not wiped out when the provider was encountered)' do
|
|
5
|
+
ChefSpec::ServerRunner.converge(described_recipe)
|
|
6
6
|
end
|
|
7
7
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'http_request::delete' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'deletes a http_request with an explicit action' do
|
|
7
7
|
expect(chef_run).to delete_http_request('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'http_request::get' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'gets a http_request with the default action' do
|
|
7
7
|
expect(chef_run).to get_http_request('default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'http_request::head' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'heads a http_request with an explicit action' do
|
|
7
7
|
expect(chef_run).to head_http_request('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'http_request::options' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'optionss a http_request with an explicit action' do
|
|
7
7
|
expect(chef_run).to options_http_request('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'http_request::post' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'posts a http_request with an explicit action' do
|
|
7
7
|
expect(chef_run).to post_http_request('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'http_request::put' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'puts a http_request with an explicit action' do
|
|
7
7
|
expect(chef_run).to put_http_request('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'ifconfig::add' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'adds a ifconfig with the default action' do
|
|
7
7
|
expect(chef_run).to add_ifconfig('10.0.0.1')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'ifconfig::delete' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'deletes a ifconfig with an explicit action' do
|
|
7
7
|
expect(chef_run).to delete_ifconfig('10.0.0.2')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'ifconfig::disable' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'disables a ifconfig with an explicit action' do
|
|
7
7
|
expect(chef_run).to disable_ifconfig('10.0.0.2')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'ifconfig::enable' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'enables a ifconfig with an explicit action' do
|
|
7
7
|
expect(chef_run).to enable_ifconfig('10.0.0.2')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'include_recipe::default' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'includes the `other` recipe' do
|
|
7
7
|
expect(chef_run).to include_recipe('include_recipe::other')
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
|
-
RSpec.configure do |config|
|
|
4
|
-
config.platform = 'solaris2'
|
|
5
|
-
config.version = '5.11'
|
|
6
|
-
end
|
|
7
|
-
|
|
8
3
|
describe 'ips_package::install' do
|
|
9
|
-
let(:chef_run)
|
|
4
|
+
let(:chef_run) do
|
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'solaris2', version: '5.11')
|
|
6
|
+
.converge(described_recipe)
|
|
7
|
+
end
|
|
10
8
|
|
|
11
9
|
it 'installs a ips_package with the default action' do
|
|
12
10
|
expect(chef_run).to install_ips_package('default_action')
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
|
-
RSpec.configure do |config|
|
|
4
|
-
config.platform = 'solaris2'
|
|
5
|
-
config.version = '5.11'
|
|
6
|
-
end
|
|
7
|
-
|
|
8
3
|
describe 'ips_package::remove' do
|
|
9
|
-
let(:chef_run)
|
|
4
|
+
let(:chef_run) do
|
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'solaris2', version: '5.11')
|
|
6
|
+
.converge(described_recipe)
|
|
7
|
+
end
|
|
10
8
|
|
|
11
9
|
it 'removes a ips_package with an explicit action' do
|
|
12
10
|
expect(chef_run).to remove_ips_package('explicit_action')
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
|
-
RSpec.configure do |config|
|
|
4
|
-
config.platform = 'solaris2'
|
|
5
|
-
config.version = '5.11'
|
|
6
|
-
end
|
|
7
|
-
|
|
8
3
|
describe 'ips_package::upgrade' do
|
|
9
|
-
let(:chef_run)
|
|
4
|
+
let(:chef_run) do
|
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'solaris2', version: '5.11')
|
|
6
|
+
.converge(described_recipe)
|
|
7
|
+
end
|
|
10
8
|
|
|
11
9
|
it 'upgrades a ips_package with an explicit action' do
|
|
12
10
|
expect(chef_run).to upgrade_ips_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'link::create' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'creates a link with the default action' do
|
|
7
7
|
expect(chef_run).to create_link('/tmp/default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'link::delete' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'deletes a link with an explicit action' do
|
|
7
7
|
expect(chef_run).to delete_link('/tmp/explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'link::link_to' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'creates a link to the specified target' do
|
|
7
7
|
link = chef_run.link('/tmp/path')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'log::write' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'writes a log with the default action' do
|
|
7
7
|
expect(chef_run).to write_log('default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'macports_package::install' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'installs a macports_package with the default action' do
|
|
7
7
|
expect(chef_run).to install_macports_package('default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'macports_package::purge' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'purges a macports_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to purge_macports_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'macports_package::remove' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'removes a macports_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to remove_macports_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'macports_package::upgrade' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'upgrades a macports_package with an explicit action' do
|
|
7
7
|
expect(chef_run).to upgrade_macports_package('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'mdadm::assemble' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'assembles a mdadm with an explicit action' do
|
|
7
7
|
expect(chef_run).to assemble_mdadm('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'mdadm::create' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'creates a mdadm with the default action' do
|
|
7
7
|
expect(chef_run).to create_mdadm('default_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'mdadm::stop' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'stops a mdadm with an explicit action' do
|
|
7
7
|
expect(chef_run).to stop_mdadm('explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'mount::disable' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'disables a mount with an explicit action' do
|
|
7
7
|
expect(chef_run).to disable_mount('/tmp/explicit_action')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'chefspec'
|
|
2
2
|
|
|
3
3
|
describe 'mount::enable' do
|
|
4
|
-
let(:chef_run) { ChefSpec::
|
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
|
5
5
|
|
|
6
6
|
it 'enables a mount with an explicit action' do
|
|
7
7
|
expect(chef_run).to enable_mount('/tmp/explicit_action')
|