chefspec 5.1.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/examples/attributes/spec/default_spec.rb +1 -1
- 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/compile_time/spec/default_spec.rb +1 -1
- data/examples/cookbook_file/spec/create_if_missing_spec.rb +1 -1
- data/examples/cookbook_file/spec/create_spec.rb +1 -1
- 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/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 +1 -1
- data/examples/directory/spec/delete_spec.rb +1 -1
- data/examples/do_nothing/spec/default_spec.rb +1 -1
- 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/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 +1 -1
- data/examples/file/spec/create_spec.rb +1 -1
- data/examples/file/spec/delete_spec.rb +1 -1
- data/examples/file/spec/touch_spec.rb +1 -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/spec/provider_service_spec.rb +1 -1
- 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/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/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/spec/install_spec.rb +1 -1
- data/examples/package/spec/purge_spec.rb +1 -1
- data/examples/package/spec/reconfig_spec.rb +1 -1
- data/examples/package/spec/remove_spec.rb +1 -1
- data/examples/package/spec/upgrade_spec.rb +1 -1
- data/examples/reboot/spec/cancel_spec.rb +1 -1
- data/examples/reboot/spec/now_spec.rb +1 -1
- data/examples/reboot/spec/request_spec.rb +1 -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/route/spec/add_spec.rb +1 -1
- data/examples/route/spec/delete_spec.rb +1 -1
- 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 +1 -1
- data/examples/server/spec/data_bag_spec.rb +1 -1
- data/examples/server/spec/environment_spec.rb +1 -1
- data/examples/server/spec/node_spec.rb +4 -4
- data/examples/server/spec/render_with_cached_spec.rb +1 -1
- data/examples/server/spec/role_spec.rb +1 -1
- data/examples/server/spec/search_spec.rb +2 -2
- 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/state_attrs/spec/default_spec.rb +1 -1
- data/examples/step_into/spec/default_spec.rb +1 -1
- data/examples/stub_command/spec/default_spec.rb +1 -1
- 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 -1
- 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 +1 -1
- data/examples/template/spec/create_spec.rb +1 -1
- 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 +1 -1
- data/examples/user/spec/create_spec.rb +2 -2
- data/examples/user/spec/lock_spec.rb +2 -2
- data/examples/user/spec/manage_spec.rb +2 -2
- data/examples/user/spec/modify_spec.rb +2 -2
- data/examples/user/spec/remove_spec.rb +2 -2
- data/examples/user/spec/unlock_spec.rb +2 -2
- data/examples/yum_repository/recipes/makecache.rb +3 -0
- data/examples/yum_repository/spec/{make_cache_spec.rb → makecache_spec.rb} +2 -2
- data/features/yum_repository.feature +1 -1
- data/lib/chefspec/api/yum_repository.rb +5 -5
- data/lib/chefspec/solo_runner.rb +1 -1
- data/lib/chefspec/version.rb +1 -1
- data/templates/errors/may_need_to_specify_platform.erb +1 -1
- metadata +4 -4
- data/examples/yum_repository/recipes/make_cache.rb +0 -3
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'subscribes::delayed' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
let(:service) { chef_run.service('receiving_resource') }
|
6
6
|
|
7
7
|
it 'subscribes to the template creation' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'subscribes::immediately' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
let(:service) { chef_run.service('receiving_resource') }
|
6
6
|
|
7
7
|
it 'sends a notification to the service' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'subversion::checkout' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'checkouts a subversion with an explicit action' do
|
7
7
|
expect(chef_run).to checkout_subversion('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'subversion::export' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'exports a subversion with an explicit action' do
|
7
7
|
expect(chef_run).to export_subversion('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'subversion::force_export' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'force_exports a subversion with an explicit action' do
|
7
7
|
expect(chef_run).to force_export_subversion('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'subversion::sync' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'syncs a subversion with the default action' do
|
7
7
|
expect(chef_run).to sync_subversion('/tmp/default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'template::create_if_missing' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a template with an explicit action' do
|
7
7
|
expect(chef_run).to create_template_if_missing('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'template::create' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a template with the default action' do
|
7
7
|
expect(chef_run).to create_template('/tmp/default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'template::delete' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'deletes a template with an explicit action' do
|
7
7
|
expect(chef_run).to delete_template('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'template::touch' do
|
4
|
-
let(:chef_run) { ChefSpec::ServerRunner.converge(described_recipe) }
|
4
|
+
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04').converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'touches a template with an explicit action' do
|
7
7
|
expect(chef_run).to touch_template('/tmp/explicit_action')
|
@@ -2,7 +2,7 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'use_inline_resources::default' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(step_into: ['use_inline_resources_lwrp'])
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04', step_into: ['use_inline_resources_lwrp'])
|
6
6
|
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
@@ -2,8 +2,8 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'user::create' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '
|
6
|
-
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
6
|
+
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'creates a user with the default action' do
|
@@ -2,8 +2,8 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'user::lock' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '
|
6
|
-
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
6
|
+
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'locks a user with an explicit action' do
|
@@ -2,8 +2,8 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'user::manage' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '
|
6
|
-
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
6
|
+
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'manages a user with an explicit action' do
|
@@ -2,8 +2,8 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'user::modify' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '
|
6
|
-
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
6
|
+
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'modifys a user with an explicit action' do
|
@@ -2,8 +2,8 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'user::remove' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '
|
6
|
-
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
6
|
+
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'removes a user with an explicit action' do
|
@@ -2,8 +2,8 @@ require 'chefspec'
|
|
2
2
|
|
3
3
|
describe 'user::unlock' do
|
4
4
|
let(:chef_run) do
|
5
|
-
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '
|
6
|
-
|
5
|
+
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
6
|
+
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'unlocks a user with an explicit action' do
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
|
-
describe 'yum_repository::
|
3
|
+
describe 'yum_repository::makecache' do
|
4
4
|
let(:chef_run) do
|
5
5
|
ChefSpec::ServerRunner.new(platform: 'centos', version: '7.2.1511')
|
6
6
|
.converge(described_recipe)
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'makes cache for a yum_repository' do
|
10
|
-
expect(chef_run).to
|
10
|
+
expect(chef_run).to makecache_yum_repository('explicit_makecache_action')
|
11
11
|
end
|
12
12
|
end
|
@@ -105,25 +105,25 @@ module ChefSpec::API
|
|
105
105
|
|
106
106
|
#
|
107
107
|
# Assert that a +yum_repository+ resource exists in the Chef run with the
|
108
|
-
# action +:
|
108
|
+
# action +:makecache+. Given a Chef Recipe that makes cache for "epel" as
|
109
109
|
# a +yum_repository+:
|
110
110
|
#
|
111
111
|
# yum_repository 'epel' do
|
112
|
-
# action :
|
112
|
+
# action :makecache
|
113
113
|
# end
|
114
114
|
#
|
115
115
|
# The Examples section demonstrates the different ways to test an
|
116
116
|
# +yum_repository+ resource with ChefSpec.
|
117
117
|
#
|
118
118
|
# @example Assert that an +yum_repository+ was make cache'd
|
119
|
-
# expect(chef_run).to
|
119
|
+
# expect(chef_run).to makecache_yum_repository('epel')
|
120
120
|
# @param [String, Regex] resource_name
|
121
121
|
# the name of the resource to match
|
122
122
|
#
|
123
123
|
# @return [ChefSpec::Matchers::ResourceMatcher]
|
124
124
|
|
125
|
-
def
|
126
|
-
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :
|
125
|
+
def makecache_yum_repository(resource_name)
|
126
|
+
ChefSpec::Matchers::ResourceMatcher.new(:yum_repository, :makecache,
|
127
127
|
resource_name)
|
128
128
|
end
|
129
129
|
end
|
data/lib/chefspec/solo_runner.rb
CHANGED
data/lib/chefspec/version.rb
CHANGED
@@ -13,7 +13,7 @@ options.
|
|
13
13
|
You can specify the platform and version you would like ChefSpec to act like
|
14
14
|
by specifying the platform and version like so:
|
15
15
|
|
16
|
-
ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '
|
16
|
+
ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04')
|
17
17
|
|
18
18
|
You can read more information in ChefSpec's README or the Fauxhai project:
|
19
19
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chefspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Crump
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|
@@ -581,12 +581,12 @@ files:
|
|
581
581
|
- examples/yum_repository/recipes/add.rb
|
582
582
|
- examples/yum_repository/recipes/create.rb
|
583
583
|
- examples/yum_repository/recipes/delete.rb
|
584
|
-
- examples/yum_repository/recipes/
|
584
|
+
- examples/yum_repository/recipes/makecache.rb
|
585
585
|
- examples/yum_repository/recipes/remove.rb
|
586
586
|
- examples/yum_repository/spec/add_spec.rb
|
587
587
|
- examples/yum_repository/spec/create_spec.rb
|
588
588
|
- examples/yum_repository/spec/delete_spec.rb
|
589
|
-
- examples/yum_repository/spec/
|
589
|
+
- examples/yum_repository/spec/makecache_spec.rb
|
590
590
|
- examples/yum_repository/spec/remove_spec.rb
|
591
591
|
- features/apt_package.feature
|
592
592
|
- features/apt_repository.feature
|