chef 13.6.4 → 13.7.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/acceptance/Gemfile +2 -2
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +1 -6
- data/distro/powershell/chef/chef.psm1 +1 -5
- data/lib/chef/api_client.rb +5 -5
- data/lib/chef/api_client_v1.rb +6 -6
- data/lib/chef/application.rb +3 -2
- data/lib/chef/application/knife.rb +4 -0
- data/lib/chef/chef_class.rb +2 -2
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +2 -4
- data/lib/chef/client.rb +3 -3
- data/lib/chef/cookbook/chefignore.rb +4 -0
- data/lib/chef/cookbook/cookbook_collection.rb +2 -2
- data/lib/chef/cookbook/metadata.rb +2 -2
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/deprecated.rb +10 -0
- data/lib/chef/event_dispatch/base.rb +2 -2
- data/lib/chef/http.rb +10 -10
- data/lib/chef/knife.rb +16 -15
- data/lib/chef/knife/configure.rb +12 -36
- data/lib/chef/knife/cookbook_upload.rb +4 -4
- data/lib/chef/knife/core/bootstrap_context.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +6 -2
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/data_bag_secret_options.rb +1 -1
- data/lib/chef/knife/data_bag_show.rb +1 -1
- data/lib/chef/knife/edit.rb +1 -1
- data/lib/chef/knife/ssh.rb +47 -35
- data/lib/chef/knife/user_create.rb +2 -0
- data/lib/chef/knife/user_delete.rb +2 -0
- data/lib/chef/knife/user_edit.rb +2 -0
- data/lib/chef/knife/user_reregister.rb +2 -0
- data/lib/chef/knife/user_show.rb +2 -0
- data/lib/chef/mixin/powershell_out.rb +1 -1
- data/lib/chef/node/attribute.rb +46 -70
- data/lib/chef/node/attribute_collections.rb +5 -5
- data/lib/chef/node/common_api.rb +1 -1
- data/lib/chef/node/immutable_collections.rb +180 -23
- data/lib/chef/node/mixin/state_tracking.rb +6 -6
- data/lib/chef/node_map.rb +63 -45
- data/lib/chef/property.rb +8 -8
- data/lib/chef/provider.rb +9 -3
- data/lib/chef/provider/apt_preference.rb +1 -1
- data/lib/chef/provider/apt_repository.rb +1 -1
- data/lib/chef/provider/apt_update.rb +1 -1
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/group/dscl.rb +6 -2
- data/lib/chef/provider/ifconfig.rb +96 -34
- data/lib/chef/provider/launchd.rb +0 -1
- data/lib/chef/provider/log.rb +3 -13
- data/lib/chef/provider/package/dnf.rb +1 -1
- data/lib/chef/provider/package/smartos.rb +2 -2
- data/lib/chef/provider/reboot.rb +12 -0
- data/lib/chef/provider/remote_directory.rb +1 -1
- data/lib/chef/provider/remote_file/http.rb +3 -2
- data/lib/chef/provider/service/solaris.rb +6 -2
- data/lib/chef/provider/systemd_unit.rb +34 -33
- data/lib/chef/provider/user/dscl.rb +1 -1
- data/lib/chef/provider/windows_path.rb +6 -7
- data/lib/chef/provider/windows_task.rb +89 -33
- data/lib/chef/provider/yum_repository.rb +24 -9
- data/lib/chef/resource/apt_package.rb +1 -0
- data/lib/chef/resource/apt_preference.rb +4 -0
- data/lib/chef/resource/apt_repository.rb +4 -0
- data/lib/chef/resource/apt_update.rb +3 -0
- data/lib/chef/resource/bash.rb +4 -0
- data/lib/chef/resource/batch.rb +5 -0
- data/lib/chef/resource/bff_package.rb +4 -0
- data/lib/chef/resource/breakpoint.rb +6 -0
- data/lib/chef/resource/cab_package.rb +6 -6
- data/lib/chef/resource/chef_gem.rb +13 -0
- data/lib/chef/resource/chocolatey_package.rb +4 -6
- data/lib/chef/resource/cookbook_file.rb +13 -15
- data/lib/chef/resource/cron.rb +2 -0
- data/lib/chef/resource/csh.rb +4 -0
- data/lib/chef/resource/directory.rb +8 -26
- data/lib/chef/resource/dnf_package.rb +5 -0
- data/lib/chef/resource/dpkg_package.rb +2 -0
- data/lib/chef/resource/dsc_resource.rb +5 -0
- data/lib/chef/resource/dsc_script.rb +6 -0
- data/lib/chef/resource/env.rb +3 -0
- data/lib/chef/resource/erl_call.rb +5 -0
- data/lib/chef/resource/execute.rb +5 -1
- data/lib/chef/resource/file.rb +2 -1
- data/lib/chef/resource/file/verification.rb +10 -0
- data/lib/chef/resource/freebsd_package.rb +10 -2
- data/lib/chef/resource/gem_package.rb +2 -0
- data/lib/chef/resource/git.rb +2 -0
- data/lib/chef/resource/group.rb +1 -0
- data/lib/chef/resource/homebrew_package.rb +3 -0
- data/lib/chef/resource/http_request.rb +2 -0
- data/lib/chef/resource/ifconfig.rb +23 -150
- data/lib/chef/resource/ips_package.rb +1 -0
- data/lib/chef/resource/ksh.rb +6 -0
- data/lib/chef/resource/launchd.rb +5 -4
- data/lib/chef/resource/link.rb +10 -0
- data/lib/chef/resource/log.rb +19 -46
- data/lib/chef/resource/macports_package.rb +1 -0
- data/lib/chef/resource/mdadm.rb +4 -0
- data/lib/chef/resource/mount.rb +1 -0
- data/lib/chef/resource/msu_package.rb +7 -8
- data/lib/chef/resource/ohai.rb +2 -0
- data/lib/chef/resource/openbsd_package.rb +3 -0
- data/lib/chef/resource/osx_profile.rb +10 -40
- data/lib/chef/resource/package.rb +6 -0
- data/lib/chef/resource/pacman_package.rb +1 -0
- data/lib/chef/resource/paludis_package.rb +3 -0
- data/lib/chef/resource/perl.rb +4 -0
- data/lib/chef/resource/portage_package.rb +1 -0
- data/lib/chef/resource/powershell_package.rb +5 -0
- data/lib/chef/resource/powershell_script.rb +8 -0
- data/lib/chef/resource/python.rb +4 -0
- data/lib/chef/resource/reboot.rb +14 -20
- data/lib/chef/resource/registry_key.rb +1 -0
- data/lib/chef/resource/remote_directory.rb +3 -0
- data/lib/chef/resource/remote_file.rb +2 -0
- data/lib/chef/resource/resource_notification.rb +17 -0
- data/lib/chef/resource/route.rb +1 -0
- data/lib/chef/resource/rpm_package.rb +1 -0
- data/lib/chef/resource/ruby.rb +4 -0
- data/lib/chef/resource/ruby_block.rb +3 -0
- data/lib/chef/resource/script.rb +4 -0
- data/lib/chef/resource/service.rb +1 -0
- data/lib/chef/resource/smartos_package.rb +1 -0
- data/lib/chef/resource/solaris_package.rb +1 -0
- data/lib/chef/resource/subversion.rb +1 -0
- data/lib/chef/resource/systemd_unit.rb +6 -0
- data/lib/chef/resource/template.rb +9 -0
- data/lib/chef/resource/user.rb +1 -0
- data/lib/chef/resource/windows_package.rb +2 -0
- data/lib/chef/resource/windows_path.rb +5 -10
- data/lib/chef/resource/windows_service.rb +3 -0
- data/lib/chef/resource/windows_task.rb +66 -87
- data/lib/chef/resource/yum_repository.rb +26 -22
- data/lib/chef/resource/zypper_package.rb +2 -0
- data/lib/chef/resource/zypper_repository.rb +6 -1
- data/lib/chef/run_context.rb +8 -2
- data/lib/chef/server_api.rb +1 -0
- data/lib/chef/util/selinux.rb +5 -4
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version/platform.rb +18 -0
- data/lib/chef/version_constraint/platform.rb +2 -0
- data/spec/data/client.d_00/02-strings.rb +2 -0
- data/spec/functional/assets/chefinittest +6 -4
- data/spec/functional/knife/ssh_spec.rb +54 -7
- data/spec/functional/resource/bff_spec.rb +3 -3
- data/spec/functional/resource/ifconfig_spec.rb +1 -1
- data/spec/functional/resource/mount_spec.rb +7 -3
- data/spec/functional/resource/user/useradd_spec.rb +4 -4
- data/spec/functional/resource/windows_task_spec.rb +6 -6
- data/spec/functional/win32/security_spec.rb +7 -33
- data/spec/integration/knife/data_bag_show_spec.rb +1 -1
- data/spec/integration/recipes/noop_resource_spec.rb +1 -1
- data/spec/integration/recipes/recipe_dsl_spec.rb +30 -30
- data/spec/integration/recipes/resource_action_spec.rb +2 -2
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +71 -15
- data/spec/spec_helper.rb +19 -0
- data/spec/support/shared/functional/execute_resource.rb +1 -1
- data/spec/support/shared/unit/application_dot_d.rb +2 -0
- data/spec/support/shared/unit/execute_resource.rb +8 -1
- data/spec/support/shared/unit/provider/file.rb +9 -1
- data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +10 -7
- data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +2 -2
- data/spec/unit/client_spec.rb +1 -1
- data/spec/unit/deprecated_spec.rb +4 -4
- data/spec/unit/http_spec.rb +9 -0
- data/spec/unit/knife/bootstrap_spec.rb +5 -0
- data/spec/unit/knife/configure_spec.rb +10 -60
- data/spec/unit/knife/data_bag_create_spec.rb +40 -2
- data/spec/unit/knife/data_bag_show_spec.rb +16 -2
- data/spec/unit/knife/ssh_spec.rb +85 -39
- data/spec/unit/knife_spec.rb +2 -0
- data/spec/unit/lwrp_spec.rb +5 -3
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +7 -6
- data/spec/unit/node/attribute_spec.rb +55 -24
- data/spec/unit/node/immutable_collections_spec.rb +28 -14
- data/spec/unit/node/vivid_mash_spec.rb +27 -10
- data/spec/unit/node_map_spec.rb +34 -0
- data/spec/unit/property_spec.rb +13 -13
- data/spec/unit/provider/group/dscl_spec.rb +14 -5
- data/spec/unit/provider/ifconfig_spec.rb +10 -3
- data/spec/unit/provider/remote_file/http_spec.rb +23 -19
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +6 -5
- data/spec/unit/provider/user/dscl_spec.rb +26 -0
- data/spec/unit/provider/windows_task_spec.rb +148 -4
- data/spec/unit/provider_spec.rb +1 -1
- data/spec/unit/resource/apt_package_spec.rb +1 -1
- data/spec/unit/resource/bash_spec.rb +8 -10
- data/spec/unit/resource/batch_spec.rb +1 -1
- data/spec/unit/resource/cab_package_spec.rb +19 -1
- data/spec/unit/resource/chef_gem_spec.rb +3 -3
- data/spec/unit/resource/chocolatey_package_spec.rb +10 -10
- data/spec/unit/resource/conditional_spec.rb +2 -2
- data/spec/unit/resource/cookbook_file_spec.rb +24 -30
- data/spec/unit/resource/cron_spec.rb +79 -82
- data/spec/unit/resource/csh_spec.rb +8 -10
- data/spec/unit/resource/deploy_spec.rb +1 -1
- data/spec/unit/resource/directory_spec.rb +28 -31
- data/spec/unit/resource/dnf_package_spec.rb +9 -9
- data/spec/unit/resource/env_spec.rb +7 -7
- data/spec/unit/resource/erl_call_spec.rb +9 -9
- data/spec/unit/resource/execute_spec.rb +6 -6
- data/spec/unit/resource/file/verification_spec.rb +18 -4
- data/spec/unit/resource/file_spec.rb +53 -56
- data/spec/unit/resource/freebsd_package_spec.rb +7 -7
- data/spec/unit/resource/gem_package_spec.rb +1 -1
- data/spec/unit/resource/git_spec.rb +7 -9
- data/spec/unit/resource/group_spec.rb +60 -70
- data/spec/unit/resource/http_request_spec.rb +16 -19
- data/spec/unit/resource/ifconfig_spec.rb +3 -3
- data/spec/unit/resource/ips_package_spec.rb +3 -5
- data/spec/unit/resource/ksh_spec.rb +8 -10
- data/spec/unit/resource/launchd_spec.rb +17 -10
- data/spec/unit/resource/link_spec.rb +53 -53
- data/spec/unit/resource/log_spec.rb +24 -28
- data/spec/unit/resource/mdadm_spec.rb +42 -44
- data/spec/unit/resource/mount_spec.rb +97 -99
- data/spec/unit/resource/msu_package_spec.rb +14 -8
- data/spec/unit/resource/ohai_spec.rb +15 -17
- data/spec/unit/resource/openbsd_package_spec.rb +3 -3
- data/spec/unit/resource/osx_profile_spec.rb +7 -7
- data/spec/unit/resource/package_spec.rb +36 -40
- data/spec/unit/resource/perl_spec.rb +8 -11
- data/spec/unit/resource/portage_package_spec.rb +8 -10
- data/spec/unit/resource/powershell_package_spec.rb +9 -9
- data/spec/unit/resource/python_spec.rb +8 -11
- data/spec/unit/resource/reboot_spec.rb +50 -0
- data/spec/unit/resource/registry_key_spec.rb +84 -98
- data/spec/unit/resource/remote_directory_spec.rb +40 -42
- data/spec/unit/resource/remote_file_spec.rb +78 -80
- data/spec/unit/resource/route_spec.rb +42 -44
- data/spec/unit/resource/rpm_package_spec.rb +5 -7
- data/spec/unit/resource/ruby_block_spec.rb +14 -16
- data/spec/unit/resource/ruby_spec.rb +8 -12
- data/spec/unit/resource/scm_spec.rb +66 -69
- data/spec/unit/resource/script_spec.rb +1 -1
- data/spec/unit/resource/service_spec.rb +80 -83
- data/spec/unit/resource/smartos_package_spec.rb +5 -0
- data/spec/unit/resource/solaris_package_spec.rb +3 -5
- data/spec/unit/resource/subversion_spec.rb +18 -16
- data/spec/unit/resource/systemd_unit_spec.rb +50 -54
- data/spec/unit/resource/template_spec.rb +56 -61
- data/spec/unit/resource/user_spec.rb +47 -53
- data/spec/unit/resource/windows_package_spec.rb +1 -1
- data/spec/unit/resource/windows_path_spec.rb +11 -8
- data/spec/unit/resource/windows_task_spec.rb +129 -33
- data/spec/unit/resource/yum_package_spec.rb +1 -1
- data/spec/unit/resource/yum_repository_spec.rb +61 -8
- data/spec/unit/resource/zypper_repository_spec.rb +17 -18
- data/spec/unit/util/selinux_spec.rb +3 -6
- data/tasks/dependencies.rb +0 -5
- data/tasks/rspec.rb +1 -1
- metadata +6 -6
- data/acceptance/top-cookbooks/.kitchen.docker.yml +0 -13
- data/acceptance/top-cookbooks/.kitchen.git.yml +0 -11
data/lib/chef/version.rb
CHANGED
@@ -16,6 +16,24 @@
|
|
16
16
|
|
17
17
|
require "chef/version_class"
|
18
18
|
|
19
|
+
# NOTE: this is fairly badly broken for its purpose and should not be used
|
20
|
+
# unless it gets fixed.
|
21
|
+
|
22
|
+
# this strictly wants x, x.y, or x.y.z version constraints in the target and
|
23
|
+
# will fail hard if it does not match. the semantics that we need here is that
|
24
|
+
# it must always do the best job that it can do and consume as much of the
|
25
|
+
# offered version as it can. since we accept arbitrarily parsed strings into
|
26
|
+
# node[:platform_version] out of dozens or potentially hundreds of operating
|
27
|
+
# systems this parsing code needs to be fixed to never raise. the Gem::Version
|
28
|
+
# class is a better model, and in fact it might be a substantially better approach
|
29
|
+
# to base this class on Gem::Version and then do pre-mangling of things like windows
|
30
|
+
# version strings via e.g. `.gsub(/R/, '.')`. the raising behavior of this parser
|
31
|
+
# however, breaks the ProviderResolver in a not just buggy but a "completely unfit
|
32
|
+
# for purpose" way.
|
33
|
+
#
|
34
|
+
# TL;DR: MUST follow the second part of "Be conservative in what you send,
|
35
|
+
# be liberal in what you accept"
|
36
|
+
#
|
19
37
|
class Chef
|
20
38
|
class Version
|
21
39
|
class Platform < Chef::Version
|
@@ -16,6 +16,8 @@
|
|
16
16
|
require "chef/version_constraint"
|
17
17
|
require "chef/version/platform"
|
18
18
|
|
19
|
+
# NOTE: this is fairly badly broken for its purpose and should not be used
|
20
|
+
# unless it gets fixed. see chef/version/platform.
|
19
21
|
class Chef
|
20
22
|
class VersionConstraint
|
21
23
|
class Platform < Chef::VersionConstraint
|
@@ -1,15 +1,17 @@
|
|
1
1
|
#!/bin/ksh
|
2
2
|
|
3
|
+
TMPDIR="${TMPDIR:-/tmp}"
|
4
|
+
|
3
5
|
function create_chef_txt {
|
4
|
-
touch /
|
6
|
+
touch $TMPDIR/chefinittest.txt
|
5
7
|
}
|
6
8
|
|
7
9
|
function delete_chef_txt {
|
8
|
-
rm /
|
10
|
+
rm $TMPDIR/chefinittest.txt
|
9
11
|
}
|
10
12
|
|
11
13
|
function rename_chef_txt {
|
12
|
-
mv /
|
14
|
+
mv $TMPDIR/chefinittest.txt $TMPDIR/$1
|
13
15
|
}
|
14
16
|
|
15
17
|
case "$1" in
|
@@ -20,7 +22,7 @@ stop )
|
|
20
22
|
delete_chef_txt
|
21
23
|
;;
|
22
24
|
status )
|
23
|
-
[ -f /
|
25
|
+
[ -f $TMPDIR/chefinittest.txt ] || [ -f $TMPDIR/chefinittest_reload.txt ] || [ -f $TMPDIR/chefinittest_restart.txt ]
|
24
26
|
;;
|
25
27
|
reload )
|
26
28
|
rename_chef_txt "chefinittest_reload.txt"
|
@@ -181,11 +181,11 @@ describe Chef::Knife::Ssh do
|
|
181
181
|
|
182
182
|
it "uses the ssh_attribute" do
|
183
183
|
@knife.run
|
184
|
-
expect(@knife.get_ssh_attribute({ "
|
184
|
+
expect(@knife.get_ssh_attribute({ "target" => "ec2.public_hostname" })).to eq("ec2.public_hostname")
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
188
|
-
context "when knife[:ssh_attribute] is not provided
|
188
|
+
context "when knife[:ssh_attribute] is not provided" do
|
189
189
|
before do
|
190
190
|
setup_knife(["*:*", "uptime"])
|
191
191
|
Chef::Config[:knife][:ssh_attribute] = nil
|
@@ -199,22 +199,69 @@ describe Chef::Knife::Ssh do
|
|
199
199
|
|
200
200
|
context "when -a ec2.public_public_hostname is provided" do
|
201
201
|
before do
|
202
|
-
setup_knife(["-a ec2.public_hostname", "*:*", "uptime"])
|
202
|
+
setup_knife(["-a", "ec2.public_hostname", "*:*", "uptime"])
|
203
203
|
Chef::Config[:knife][:ssh_attribute] = nil
|
204
204
|
end
|
205
205
|
|
206
206
|
it "should use the value on the command line" do
|
207
207
|
@knife.run
|
208
|
-
expect(@knife.config[:
|
208
|
+
expect(@knife.config[:ssh_attribute]).to eq("ec2.public_hostname")
|
209
209
|
end
|
210
210
|
|
211
211
|
it "should override what is set in knife.rb" do
|
212
212
|
# This is the setting imported from knife.rb
|
213
213
|
Chef::Config[:knife][:ssh_attribute] = "fqdn"
|
214
214
|
# Then we run knife with the -a flag, which sets the above variable
|
215
|
-
setup_knife(["-a ec2.public_hostname", "*:*", "uptime"])
|
215
|
+
setup_knife(["-a", "ec2.public_hostname", "*:*", "uptime"])
|
216
216
|
@knife.run
|
217
|
-
expect(@knife.config[:
|
217
|
+
expect(@knife.config[:ssh_attribute]).to eq("ec2.public_hostname")
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
describe "prefix" do
|
223
|
+
context "when knife[:prefix_attribute] is set" do
|
224
|
+
before do
|
225
|
+
setup_knife(["*:*", "uptime"])
|
226
|
+
Chef::Config[:knife][:prefix_attribute] = "name"
|
227
|
+
end
|
228
|
+
|
229
|
+
it "uses the prefix_attribute" do
|
230
|
+
@knife.run
|
231
|
+
expect(@knife.get_prefix_attribute({ "prefix" => "name" })).to eq("name")
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
context "when knife[:prefix_attribute] is not provided" do
|
236
|
+
before do
|
237
|
+
setup_knife(["*:*", "uptime"])
|
238
|
+
Chef::Config[:knife][:prefix_attribute] = nil
|
239
|
+
end
|
240
|
+
|
241
|
+
it "falls back to nil" do
|
242
|
+
@knife.run
|
243
|
+
expect(@knife.get_prefix_attribute({})).to eq(nil)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
context "when --prefix-attribute ec2.public_public_hostname is provided" do
|
248
|
+
before do
|
249
|
+
setup_knife(["--prefix-attribute", "ec2.public_hostname", "*:*", "uptime"])
|
250
|
+
Chef::Config[:knife][:prefix_attribute] = nil
|
251
|
+
end
|
252
|
+
|
253
|
+
it "should use the value on the command line" do
|
254
|
+
@knife.run
|
255
|
+
expect(@knife.config[:prefix_attribute]).to eq("ec2.public_hostname")
|
256
|
+
end
|
257
|
+
|
258
|
+
it "should override what is set in knife.rb" do
|
259
|
+
# This is the setting imported from knife.rb
|
260
|
+
Chef::Config[:knife][:prefix_attribute] = "fqdn"
|
261
|
+
# Then we run knife with the -b flag, which sets the above variable
|
262
|
+
setup_knife(["--prefix-attribute", "ec2.public_hostname", "*:*", "uptime"])
|
263
|
+
@knife.run
|
264
|
+
expect(@knife.config[:prefix_attribute]).to eq("ec2.public_hostname")
|
218
265
|
end
|
219
266
|
end
|
220
267
|
end
|
@@ -305,7 +352,7 @@ describe Chef::Knife::Ssh do
|
|
305
352
|
Chef::Config[:chef_server_url] = "http://localhost:9000"
|
306
353
|
|
307
354
|
@api.post("/search/node?q=*:*&start=0&rows=1000", 200) do
|
308
|
-
%({"total":1, "start":0, "rows":[{"data": {"fqdn":"the.fqdn", "
|
355
|
+
%({"total":1, "start":0, "rows":[{"data": {"fqdn":"the.fqdn", "target": "the_public_hostname"}}]})
|
309
356
|
end
|
310
357
|
end
|
311
358
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Prabhu Das (<prabhu.das@clogeny.com>)
|
3
|
-
# Copyright:: Copyright 2013-
|
3
|
+
# Copyright:: Copyright 2013-2017, Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -62,7 +62,7 @@ describe Chef::Resource::BffPackage, :requires_root, :external => ohai[:platform
|
|
62
62
|
|
63
63
|
context "package install action with options" do
|
64
64
|
it "should install a package" do
|
65
|
-
new_resource.options("-e/
|
65
|
+
new_resource.options("-e#{Dir.tmpdir}/installp.log")
|
66
66
|
new_resource.run_action(:install)
|
67
67
|
bff_pkg_should_be_installed(new_resource)
|
68
68
|
end
|
@@ -108,7 +108,7 @@ describe Chef::Resource::BffPackage, :requires_root, :external => ohai[:platform
|
|
108
108
|
end
|
109
109
|
|
110
110
|
it "should remove an installed package" do
|
111
|
-
new_resource.options("-e/
|
111
|
+
new_resource.options("-e#{Dir.tmpdir}/installp.log")
|
112
112
|
new_resource.run_action(:remove)
|
113
113
|
bff_pkg_should_be_removed(new_resource)
|
114
114
|
end
|
@@ -20,7 +20,7 @@ require "functional/resource/base"
|
|
20
20
|
require "chef/mixin/shell_out"
|
21
21
|
|
22
22
|
# run this test only for following platforms.
|
23
|
-
include_flag = !(%w{
|
23
|
+
include_flag = !(%w{amazon debian aix}.include?(ohai[:platform_family]) || (ohai[:platform_family] == "rhel" && ohai[:platform_version].to_i < 7))
|
24
24
|
|
25
25
|
describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, :external => include_flag do
|
26
26
|
# This test does not work in travis because there is no eth0
|
@@ -22,7 +22,7 @@ require "chef/mixin/shell_out"
|
|
22
22
|
require "tmpdir"
|
23
23
|
|
24
24
|
# run this test only for following platforms.
|
25
|
-
include_flag = !(%w{
|
25
|
+
include_flag = !(%w{debian rhel amazon aix solaris2}.include?(ohai[:platform_family]))
|
26
26
|
|
27
27
|
describe Chef::Resource::Mount, :requires_root, :skip_travis, :external => include_flag do
|
28
28
|
# Disabled in travis because it refuses to let us mount a ramdisk. /dev/ramX does not
|
@@ -35,15 +35,19 @@ describe Chef::Resource::Mount, :requires_root, :skip_travis, :external => inclu
|
|
35
35
|
def setup_device_for_mount
|
36
36
|
# use ramdisk for creating a test device for mount.
|
37
37
|
# This can cleaner if we have chef resource/provider for ramdisk.
|
38
|
-
case ohai[:
|
38
|
+
case ohai[:platform_family]
|
39
39
|
when "aix"
|
40
40
|
# On AIX, we can't create a ramdisk inside a WPAR, so we use
|
41
41
|
# a "namefs" mount against / to test
|
42
42
|
# https://www-304.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.performance/namefs_file_sys.htm
|
43
43
|
device = "/"
|
44
44
|
fstype = "namefs"
|
45
|
-
when "
|
45
|
+
when "debian", "rhel", "amazon"
|
46
46
|
device = "/dev/ram1"
|
47
|
+
unless File.exist?(device)
|
48
|
+
shell_out("mknod -m 660 #{device} b 1 0")
|
49
|
+
shell_out("chown root:disk #{device}")
|
50
|
+
end
|
47
51
|
shell_out("ls -1 /dev/ram*").stdout.each_line do |d|
|
48
52
|
if shell_out("mount | grep #{d}").exitstatus == "1"
|
49
53
|
# this device is not mounted, so use it.
|
@@ -646,10 +646,10 @@ describe Chef::Provider::User::Useradd, metadata do
|
|
646
646
|
expect(@error.message).to include("Cannot unlock the password")
|
647
647
|
end
|
648
648
|
elsif %w{rhel}.include?(OHAI_SYSTEM["platform_family"]) &&
|
649
|
-
OHAI_SYSTEM["platform_version"].to_f
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
649
|
+
(Chef::VersionConstraint.new("~> 6.8").include?(OHAI_SYSTEM["platform_version"].to_f) || Chef::VersionConstraint.new("~> 7.3").include?(OHAI_SYSTEM["platform_version"].to_f))
|
650
|
+
# RHEL 6.8 and 7.3 ship with a fixed `usermod` command
|
651
|
+
# Reference: https://access.redhat.com/errata/RHBA-2016:0864
|
652
|
+
# Reference: https://access.redhat.com/errata/RHBA-2016:2322
|
653
653
|
it "errors out trying to unlock the user" do
|
654
654
|
expect(@error).to be_a(Mixlib::ShellOut::ShellCommandFailed)
|
655
655
|
expect(@error.message).to include("You should set a password")
|
@@ -308,7 +308,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
308
308
|
it "raises error if invalid random_delay is passed" do
|
309
309
|
subject.frequency :minute
|
310
310
|
subject.random_delay "abc"
|
311
|
-
expect { subject.after_created }.to raise_error("Invalid value passed for `random_delay`. Please pass seconds as a String e.g. '60'.")
|
311
|
+
expect { subject.after_created }.to raise_error("Invalid value passed for `random_delay`. Please pass seconds as an Integer (e.g. 60) or a String with numeric values only (e.g. '60').")
|
312
312
|
end
|
313
313
|
|
314
314
|
it "raises error if random_delay is passed with frequency on_idle" do
|
@@ -339,7 +339,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
339
339
|
it "raises error" do
|
340
340
|
subject.user "Administrator"
|
341
341
|
subject.frequency :onstart
|
342
|
-
expect { subject.after_created }.to raise_error(
|
342
|
+
expect { subject.after_created }.to raise_error(%q{Cannot specify a user other than the system users without specifying a password!. Valid passwordless users: 'NT AUTHORITY\SYSTEM', 'SYSTEM', 'NT AUTHORITY\LOCALSERVICE', 'NT AUTHORITY\NETWORKSERVICE', 'BUILTIN\USERS', 'USERS'})
|
343
343
|
end
|
344
344
|
end
|
345
345
|
|
@@ -355,7 +355,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
355
355
|
it "raises error" do
|
356
356
|
subject.frequency_modifier 1450
|
357
357
|
subject.frequency :minute
|
358
|
-
expect { subject.after_created }.to raise_error("frequency_modifier value 1450 is invalid.
|
358
|
+
expect { subject.after_created }.to raise_error("frequency_modifier value 1450 is invalid. Valid values for :minute frequency are 1 - 1439.")
|
359
359
|
end
|
360
360
|
end
|
361
361
|
|
@@ -363,7 +363,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
363
363
|
it "raises error" do
|
364
364
|
subject.months "xyz"
|
365
365
|
subject.frequency :monthly
|
366
|
-
expect { subject.after_created }.to raise_error("months
|
366
|
+
expect { subject.after_created }.to raise_error("months property invalid. Only valid values are: JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC and *. Multiple values must be separated by a comma.")
|
367
367
|
end
|
368
368
|
end
|
369
369
|
|
@@ -371,7 +371,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
371
371
|
it "raises error" do
|
372
372
|
subject.idle_time 1000
|
373
373
|
subject.frequency :on_idle
|
374
|
-
expect { subject.after_created }.to raise_error("idle_time value 1000 is invalid.
|
374
|
+
expect { subject.after_created }.to raise_error("idle_time value 1000 is invalid. Valid values for :on_idle frequency are 1 - 999.")
|
375
375
|
end
|
376
376
|
end
|
377
377
|
|
@@ -379,7 +379,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
379
379
|
it "raises error" do
|
380
380
|
subject.idle_time 300
|
381
381
|
subject.frequency :monthly
|
382
|
-
expect { subject.after_created }.to raise_error("idle_time
|
382
|
+
expect { subject.after_created }.to raise_error("idle_time property is only valid for tasks that run on_idle")
|
383
383
|
end
|
384
384
|
end
|
385
385
|
end
|
@@ -17,8 +17,6 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "spec_helper"
|
20
|
-
require "mixlib/shellout"
|
21
|
-
require "chef/mixin/user_context"
|
22
20
|
if Chef::Platform.windows?
|
23
21
|
require "chef/win32/security"
|
24
22
|
end
|
@@ -28,37 +26,13 @@ describe "Chef::Win32::Security", :windows_only do
|
|
28
26
|
expect(Chef::ReservedNames::Win32::Security.has_admin_privileges?).to eq(true)
|
29
27
|
end
|
30
28
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
whoami.run_command
|
39
|
-
whoami.error!
|
40
|
-
whoami.stdout.split("\\")[0]
|
41
|
-
end
|
42
|
-
before do
|
43
|
-
allow_any_instance_of(Chef::Mixin::UserContext).to receive(:node).and_return({ "platform_family" => "windows" })
|
44
|
-
allow(Chef::Platform).to receive(:windows_server_2003?).and_return(false)
|
45
|
-
allow(Chef::ReservedNames::Win32::Security).to receive(:OpenProcessToken).and_return(true)
|
46
|
-
add_user = Mixlib::ShellOut.new("net user #{user} #{password} /ADD")
|
47
|
-
add_user.run_command
|
48
|
-
add_user.error!
|
49
|
-
end
|
50
|
-
|
51
|
-
after do
|
52
|
-
delete_user = Mixlib::ShellOut.new("net user #{user} /delete")
|
53
|
-
delete_user.run_command
|
54
|
-
delete_user.error!
|
55
|
-
end
|
56
|
-
it "has_admin_privileges? returns false" do
|
57
|
-
has_admin_privileges = with_user_context(user, password, domain) do
|
58
|
-
Chef::ReservedNames::Win32::Security.has_admin_privileges?
|
59
|
-
end
|
60
|
-
expect(has_admin_privileges).to eq(false)
|
61
|
-
end
|
29
|
+
# We've done some investigation adding a negative test and it turned
|
30
|
+
# out to be a lot of work since mixlib-shellout doesn't have user
|
31
|
+
# support for windows.
|
32
|
+
#
|
33
|
+
# TODO - Add negative tests once mixlib-shellout has user support
|
34
|
+
it "has_admin_privileges? returns false when running as non-admin" do
|
35
|
+
skip "requires user support in mixlib-shellout"
|
62
36
|
end
|
63
37
|
|
64
38
|
describe "get_file_security" do
|
@@ -44,7 +44,7 @@ EOM
|
|
44
44
|
end
|
45
45
|
|
46
46
|
it "with a single item" do
|
47
|
-
knife("data bag show rocket falcon9").should_succeed <<EOM
|
47
|
+
knife("data bag show rocket falcon9").should_succeed <<EOM
|
48
48
|
heavy: true
|
49
49
|
id: falcon9
|
50
50
|
EOM
|
@@ -12,7 +12,7 @@ describe "Recipe DSL methods" do
|
|
12
12
|
before { Namer.current_index += 1 }
|
13
13
|
|
14
14
|
context "with resource 'base_thingy' declared as BaseThingy" do
|
15
|
-
before(:
|
15
|
+
before(:each) do
|
16
16
|
|
17
17
|
class BaseThingy < Chef::Resource
|
18
18
|
resource_name "base_thingy"
|
@@ -66,7 +66,7 @@ describe "Recipe DSL methods" do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
context "nameless resources" do
|
69
|
-
before(:
|
69
|
+
before(:each) do
|
70
70
|
class NamelessThingy < BaseThingy
|
71
71
|
resource_name :nameless_thingy
|
72
72
|
provides :nameless_thingy
|
@@ -91,7 +91,7 @@ describe "Recipe DSL methods" do
|
|
91
91
|
end
|
92
92
|
|
93
93
|
context "with a resource named RecipeDSLSpecNamespace::Bar::BarThingy" do
|
94
|
-
before(:
|
94
|
+
before(:each) do
|
95
95
|
|
96
96
|
class RecipeDSLSpecNamespace::Bar::BarThingy < BaseThingy
|
97
97
|
end
|
@@ -106,7 +106,7 @@ describe "Recipe DSL methods" do
|
|
106
106
|
end
|
107
107
|
|
108
108
|
context "with a resource named Chef::Resource::NoNameThingy with resource_name nil" do
|
109
|
-
before(:
|
109
|
+
before(:each) do
|
110
110
|
|
111
111
|
class Chef::Resource::NoNameThingy < BaseThingy
|
112
112
|
resource_name nil
|
@@ -122,7 +122,7 @@ describe "Recipe DSL methods" do
|
|
122
122
|
end
|
123
123
|
|
124
124
|
context "with a resource named AnotherNoNameThingy with resource_name :another_thingy_name" do
|
125
|
-
before(:
|
125
|
+
before(:each) do
|
126
126
|
|
127
127
|
class AnotherNoNameThingy < BaseThingy
|
128
128
|
resource_name :another_thingy_name
|
@@ -146,7 +146,7 @@ describe "Recipe DSL methods" do
|
|
146
146
|
end
|
147
147
|
|
148
148
|
context "with a resource named AnotherNoNameThingy2 with resource_name :another_thingy_name2; resource_name :another_thingy_name3" do
|
149
|
-
before(:
|
149
|
+
before(:each) do
|
150
150
|
|
151
151
|
class AnotherNoNameThingy2 < BaseThingy
|
152
152
|
resource_name :another_thingy_name2
|
@@ -178,7 +178,7 @@ describe "Recipe DSL methods" do
|
|
178
178
|
|
179
179
|
context "provides overriding resource_name" do
|
180
180
|
context "with a resource named AnotherNoNameThingy3 with provides :another_no_name_thingy3, os: 'blarghle'" do
|
181
|
-
before(:
|
181
|
+
before(:each) do
|
182
182
|
|
183
183
|
class AnotherNoNameThingy3 < BaseThingy
|
184
184
|
resource_name :another_no_name_thingy_3
|
@@ -207,7 +207,7 @@ describe "Recipe DSL methods" do
|
|
207
207
|
end
|
208
208
|
|
209
209
|
context "with a resource named AnotherNoNameThingy4 with two provides" do
|
210
|
-
before(:
|
210
|
+
before(:each) do
|
211
211
|
|
212
212
|
class AnotherNoNameThingy4 < BaseThingy
|
213
213
|
resource_name :another_no_name_thingy_4
|
@@ -247,7 +247,7 @@ describe "Recipe DSL methods" do
|
|
247
247
|
end
|
248
248
|
|
249
249
|
context "with a resource named AnotherNoNameThingy5, a different resource_name, and a provides with the original resource_name" do
|
250
|
-
before(:
|
250
|
+
before(:each) do
|
251
251
|
|
252
252
|
class AnotherNoNameThingy5 < BaseThingy
|
253
253
|
resource_name :another_thingy_name_for_another_no_name_thingy5
|
@@ -284,7 +284,7 @@ describe "Recipe DSL methods" do
|
|
284
284
|
end
|
285
285
|
|
286
286
|
context "with a resource named AnotherNoNameThingy6, a provides with the original resource name, and a different resource_name" do
|
287
|
-
before(:
|
287
|
+
before(:each) do
|
288
288
|
|
289
289
|
class AnotherNoNameThingy6 < BaseThingy
|
290
290
|
provides :another_no_name_thingy6, os: "blarghle"
|
@@ -321,7 +321,7 @@ describe "Recipe DSL methods" do
|
|
321
321
|
end
|
322
322
|
|
323
323
|
context "with a resource named AnotherNoNameThingy7, a new resource_name, and provides with that new resource name" do
|
324
|
-
before(:
|
324
|
+
before(:each) do
|
325
325
|
|
326
326
|
class AnotherNoNameThingy7 < BaseThingy
|
327
327
|
resource_name :another_thingy_name_for_another_no_name_thingy7
|
@@ -359,7 +359,7 @@ describe "Recipe DSL methods" do
|
|
359
359
|
|
360
360
|
# opposite order from the previous test (provides, then resource_name)
|
361
361
|
context "with a resource named AnotherNoNameThingy8, a provides with a new resource name, and resource_name with that new resource name" do
|
362
|
-
before(:
|
362
|
+
before(:each) do
|
363
363
|
|
364
364
|
class AnotherNoNameThingy8 < BaseThingy
|
365
365
|
provides :another_thingy_name_for_another_no_name_thingy8, os: "blarghle"
|
@@ -399,7 +399,7 @@ describe "Recipe DSL methods" do
|
|
399
399
|
|
400
400
|
context "provides" do
|
401
401
|
context "when MySupplier provides :hemlock" do
|
402
|
-
before(:
|
402
|
+
before(:each) do
|
403
403
|
|
404
404
|
class RecipeDSLSpecNamespace::MySupplier < BaseThingy
|
405
405
|
resource_name :hemlock
|
@@ -422,7 +422,7 @@ describe "Recipe DSL methods" do
|
|
422
422
|
end
|
423
423
|
|
424
424
|
context "when Thingy3 has resource_name :thingy3" do
|
425
|
-
before(:
|
425
|
+
before(:each) do
|
426
426
|
|
427
427
|
class RecipeDSLSpecNamespace::Thingy3 < BaseThingy
|
428
428
|
resource_name :thingy3
|
@@ -438,7 +438,7 @@ describe "Recipe DSL methods" do
|
|
438
438
|
end
|
439
439
|
|
440
440
|
context "and Thingy4 has resource_name :thingy3" do
|
441
|
-
before(:
|
441
|
+
before(:each) do
|
442
442
|
|
443
443
|
class RecipeDSLSpecNamespace::Thingy4 < BaseThingy
|
444
444
|
resource_name :thingy3
|
@@ -466,7 +466,7 @@ describe "Recipe DSL methods" do
|
|
466
466
|
end
|
467
467
|
|
468
468
|
context "when Thingy5 has resource_name :thingy5 and provides :thingy5reverse, :thingy5_2 and :thingy5_2reverse" do
|
469
|
-
before(:
|
469
|
+
before(:each) do
|
470
470
|
|
471
471
|
class RecipeDSLSpecNamespace::Thingy5 < BaseThingy
|
472
472
|
resource_name :thingy5
|
@@ -485,7 +485,7 @@ describe "Recipe DSL methods" do
|
|
485
485
|
end
|
486
486
|
|
487
487
|
context "and Thingy6 provides :thingy5" do
|
488
|
-
before(:
|
488
|
+
before(:each) do
|
489
489
|
|
490
490
|
class RecipeDSLSpecNamespace::Thingy6 < BaseThingy
|
491
491
|
resource_name :thingy6
|
@@ -513,7 +513,7 @@ describe "Recipe DSL methods" do
|
|
513
513
|
end
|
514
514
|
|
515
515
|
context "and AThingy5 provides :thingy5reverse" do
|
516
|
-
before(:
|
516
|
+
before(:each) do
|
517
517
|
|
518
518
|
class RecipeDSLSpecNamespace::AThingy5 < BaseThingy
|
519
519
|
resource_name :thingy5reverse
|
@@ -530,7 +530,7 @@ describe "Recipe DSL methods" do
|
|
530
530
|
end
|
531
531
|
|
532
532
|
context "and ZRecipeDSLSpecNamespace::Thingy5 provides :thingy5_2" do
|
533
|
-
before(:
|
533
|
+
before(:each) do
|
534
534
|
|
535
535
|
module ZRecipeDSLSpecNamespace
|
536
536
|
class Thingy5 < BaseThingy
|
@@ -549,7 +549,7 @@ describe "Recipe DSL methods" do
|
|
549
549
|
end
|
550
550
|
|
551
551
|
context "and ARecipeDSLSpecNamespace::Thingy5 provides :thingy5_2" do
|
552
|
-
before(:
|
552
|
+
before(:each) do
|
553
553
|
|
554
554
|
module ARecipeDSLSpecNamespace
|
555
555
|
class Thingy5 < BaseThingy
|
@@ -569,7 +569,7 @@ describe "Recipe DSL methods" do
|
|
569
569
|
end
|
570
570
|
|
571
571
|
context "when Thingy3 has resource_name :thingy3" do
|
572
|
-
before(:
|
572
|
+
before(:each) do
|
573
573
|
|
574
574
|
class RecipeDSLSpecNamespace::Thingy3 < BaseThingy
|
575
575
|
resource_name :thingy3
|
@@ -585,7 +585,7 @@ describe "Recipe DSL methods" do
|
|
585
585
|
end
|
586
586
|
|
587
587
|
context "and Thingy4 has resource_name :thingy3" do
|
588
|
-
before(:
|
588
|
+
before(:each) do
|
589
589
|
|
590
590
|
class RecipeDSLSpecNamespace::Thingy4 < BaseThingy
|
591
591
|
resource_name :thingy3
|
@@ -612,7 +612,7 @@ describe "Recipe DSL methods" do
|
|
612
612
|
end
|
613
613
|
|
614
614
|
context "and Thingy4 has resource_name :thingy3" do
|
615
|
-
before(:
|
615
|
+
before(:each) do
|
616
616
|
|
617
617
|
class RecipeDSLSpecNamespace::Thingy4 < BaseThingy
|
618
618
|
resource_name :thingy3
|
@@ -642,7 +642,7 @@ describe "Recipe DSL methods" do
|
|
642
642
|
end
|
643
643
|
|
644
644
|
context "when Thingy7 provides :thingy8" do
|
645
|
-
before(:
|
645
|
+
before(:each) do
|
646
646
|
|
647
647
|
class RecipeDSLSpecNamespace::Thingy7 < BaseThingy
|
648
648
|
resource_name :thingy7
|
@@ -652,7 +652,7 @@ describe "Recipe DSL methods" do
|
|
652
652
|
end
|
653
653
|
|
654
654
|
context "and Thingy8 has resource_name :thingy8" do
|
655
|
-
before(:
|
655
|
+
before(:each) do
|
656
656
|
|
657
657
|
class RecipeDSLSpecNamespace::Thingy8 < BaseThingy
|
658
658
|
resource_name :thingy8
|
@@ -681,7 +681,7 @@ describe "Recipe DSL methods" do
|
|
681
681
|
end
|
682
682
|
|
683
683
|
context "when Thingy12 provides :thingy12, :twizzle and :twizzle2" do
|
684
|
-
before(:
|
684
|
+
before(:each) do
|
685
685
|
|
686
686
|
class RecipeDSLSpecNamespace::Thingy12 < BaseThingy
|
687
687
|
resource_name :thingy12
|
@@ -714,7 +714,7 @@ describe "Recipe DSL methods" do
|
|
714
714
|
end
|
715
715
|
|
716
716
|
context "with platform-specific resources 'my_super_thingy_foo' and 'my_super_thingy_bar'" do
|
717
|
-
before(:
|
717
|
+
before(:each) do
|
718
718
|
class MySuperThingyFoo < BaseThingy
|
719
719
|
resource_name :my_super_thingy_foo
|
720
720
|
provides :my_super_thingy, platform: "foo"
|
@@ -760,7 +760,7 @@ describe "Recipe DSL methods" do
|
|
760
760
|
end
|
761
761
|
|
762
762
|
context "when Thingy10 provides :thingy10" do
|
763
|
-
before(:
|
763
|
+
before(:each) do
|
764
764
|
class RecipeDSLSpecNamespace::Thingy10 < BaseThingy
|
765
765
|
resource_name :thingy10
|
766
766
|
end
|
@@ -775,7 +775,7 @@ describe "Recipe DSL methods" do
|
|
775
775
|
end
|
776
776
|
|
777
777
|
context "when Thingy11 provides :thingy11" do
|
778
|
-
before(:
|
778
|
+
before(:each) do
|
779
779
|
class RecipeDSLSpecNamespace::Thingy11 < BaseThingy
|
780
780
|
resource_name :thingy10
|
781
781
|
end
|
@@ -1309,7 +1309,7 @@ describe "Recipe DSL methods" do
|
|
1309
1309
|
end
|
1310
1310
|
|
1311
1311
|
context "with UTF-8 provides" do
|
1312
|
-
before(:
|
1312
|
+
before(:each) do
|
1313
1313
|
class UTF8Thingy < BaseThingy
|
1314
1314
|
resource_name :Straße
|
1315
1315
|
provides :Straße
|