beaker 4.40.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +26 -13
- data/.rubocop.yml +23 -10
- data/.rubocop_todo.yml +34 -10
- data/CHANGELOG.md +13 -11
- data/Gemfile +12 -7
- data/Rakefile +99 -111
- data/acceptance/config/acceptance-options.rb +1 -1
- data/acceptance/config/base/acceptance-options.rb +2 -2
- data/acceptance/config/hypervisor/acceptance-options.rb +2 -2
- data/acceptance/config/subcommands/acceptance-options.rb +2 -2
- data/acceptance/fixtures/module/Rakefile +1 -1
- data/acceptance/fixtures/module/spec/acceptance/demo_spec.rb +8 -12
- data/acceptance/fixtures/module/spec/classes/init_spec.rb +0 -1
- data/acceptance/fixtures/module/spec/spec_helper_acceptance.rb +3 -5
- data/acceptance/lib/helpers/test_helper.rb +4 -3
- data/acceptance/pre_suite/subcommands/05_install_ruby.rb +2 -3
- data/acceptance/pre_suite/subcommands/08_install_beaker.rb +1 -2
- data/acceptance/tests/base/dsl/helpers/configuration_test.rb +4 -4
- data/acceptance/tests/base/dsl/helpers/hocon_helpers_test.rb +1 -2
- data/acceptance/tests/base/dsl/helpers/host_helpers/add_system32_hosts_entry_test.rb +0 -3
- data/acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb +3 -1
- data/acceptance/tests/base/dsl/helpers/host_helpers/backup_the_file_test.rb +9 -9
- data/acceptance/tests/base/dsl/helpers/host_helpers/check_for_package_test.rb +0 -4
- data/acceptance/tests/base/dsl/helpers/host_helpers/create_remote_file_test.rb +19 -26
- data/acceptance/tests/base/dsl/helpers/host_helpers/curl_on_test.rb +2 -2
- data/acceptance/tests/base/dsl/helpers/host_helpers/curl_with_retries_test.rb +0 -1
- data/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb +18 -13
- data/acceptance/tests/base/dsl/helpers/host_helpers/retry_on_test.rb +3 -3
- data/acceptance/tests/base/dsl/helpers/host_helpers/rsync_to_test.rb +22 -27
- data/acceptance/tests/base/dsl/helpers/host_helpers/run_cron_on_test.rb +12 -16
- data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_on_test.rb +3 -4
- data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_test.rb +3 -3
- data/acceptance/tests/base/dsl/helpers/host_helpers/scp_from_test.rb +4 -4
- data/acceptance/tests/base/dsl/helpers/host_helpers/scp_to_test.rb +3 -4
- data/acceptance/tests/base/dsl/helpers/host_helpers/shell_test.rb +5 -5
- data/acceptance/tests/base/dsl/helpers/host_helpers/upgrade_package_test.rb +3 -5
- data/acceptance/tests/base/dsl/platform_tag_confiner_test.rb +14 -17
- data/acceptance/tests/base/dsl/structure_test.rb +5 -11
- data/acceptance/tests/base/host/file_test.rb +2 -2
- data/acceptance/tests/base/host/group_test.rb +0 -1
- data/acceptance/tests/base/host/host_test.rb +66 -63
- data/acceptance/tests/base/host/packages.rb +1 -2
- data/acceptance/tests/base/host/packages_unix.rb +0 -55
- data/acceptance/tests/base/host/user_test.rb +0 -1
- data/acceptance/tests/base/host_prebuilt_steps/ssh_environment_test.rb +1 -2
- data/acceptance/tests/base/test_suite/export.rb +6 -9
- data/acceptance/tests/install/from_file.rb +2 -4
- data/acceptance/tests/load_path_bootstrap.rb +1 -1
- data/acceptance/tests/subcommands/destroy.rb +19 -21
- data/acceptance/tests/subcommands/exec.rb +0 -1
- data/acceptance/tests/subcommands/init.rb +2 -3
- data/acceptance/tests/subcommands/provision.rb +0 -1
- data/beaker.gemspec +4 -7
- data/docs/concepts/argument_processing_and_precedence.md +1 -10
- data/docs/how_to/debug_beaker_tests.md +12 -12
- data/docs/how_to/hosts/eos.md +2 -12
- data/docs/how_to/install_puppet.md +0 -18
- data/docs/how_to/the_beaker_dsl.md +0 -2
- data/lib/beaker/cli.rb +59 -68
- data/lib/beaker/command.rb +20 -28
- data/lib/beaker/command_factory.rb +3 -2
- data/lib/beaker/dsl/assertions.rb +6 -18
- data/lib/beaker/dsl/helpers/hocon_helpers.rb +3 -7
- data/lib/beaker/dsl/helpers/host_helpers.rb +62 -123
- data/lib/beaker/dsl/helpers/test_helpers.rb +3 -5
- data/lib/beaker/dsl/helpers/web_helpers.rb +19 -39
- data/lib/beaker/dsl/helpers.rb +2 -4
- data/lib/beaker/dsl/outcomes.rb +13 -15
- data/lib/beaker/dsl/patterns.rb +1 -3
- data/lib/beaker/dsl/roles.rb +17 -20
- data/lib/beaker/dsl/structure.rb +53 -65
- data/lib/beaker/dsl/test_tagging.rb +7 -10
- data/lib/beaker/dsl/wrappers.rb +15 -16
- data/lib/beaker/dsl.rb +2 -3
- data/lib/beaker/host/aix/exec.rb +1 -1
- data/lib/beaker/host/aix/file.rb +0 -1
- data/lib/beaker/host/aix/group.rb +1 -1
- data/lib/beaker/host/aix/user.rb +1 -1
- data/lib/beaker/host/aix.rb +3 -4
- data/lib/beaker/host/cisco.rb +27 -39
- data/lib/beaker/host/eos.rb +4 -30
- data/lib/beaker/host/freebsd/exec.rb +1 -1
- data/lib/beaker/host/freebsd/pkg.rb +3 -3
- data/lib/beaker/host/freebsd.rb +9 -12
- data/lib/beaker/host/mac/exec.rb +4 -4
- data/lib/beaker/host/mac/group.rb +7 -7
- data/lib/beaker/host/mac/pkg.rb +3 -106
- data/lib/beaker/host/mac/user.rb +2 -2
- data/lib/beaker/host/mac.rb +8 -9
- data/lib/beaker/host/pswindows/exec.rb +66 -70
- data/lib/beaker/host/pswindows/file.rb +3 -5
- data/lib/beaker/host/pswindows/group.rb +3 -3
- data/lib/beaker/host/pswindows/pkg.rb +12 -12
- data/lib/beaker/host/pswindows/user.rb +3 -3
- data/lib/beaker/host/pswindows.rb +4 -3
- data/lib/beaker/host/unix/exec.rb +80 -82
- data/lib/beaker/host/unix/file.rb +38 -43
- data/lib/beaker/host/unix/group.rb +1 -1
- data/lib/beaker/host/unix/pkg.rb +154 -417
- data/lib/beaker/host/unix/user.rb +2 -2
- data/lib/beaker/host/unix.rb +8 -11
- data/lib/beaker/host/windows/exec.rb +17 -17
- data/lib/beaker/host/windows/file.rb +3 -3
- data/lib/beaker/host/windows/group.rb +3 -3
- data/lib/beaker/host/windows/pkg.rb +3 -54
- data/lib/beaker/host/windows/user.rb +3 -3
- data/lib/beaker/host/windows.rb +12 -12
- data/lib/beaker/host.rb +76 -133
- data/lib/beaker/host_prebuilt_steps.rb +93 -198
- data/lib/beaker/hypervisor/noop.rb +2 -4
- data/lib/beaker/hypervisor.rb +44 -61
- data/lib/beaker/local_connection.rb +2 -4
- data/lib/beaker/logger.rb +68 -76
- data/lib/beaker/logger_junit.rb +21 -25
- data/lib/beaker/network_manager.rb +39 -42
- data/lib/beaker/options/command_line_parser.rb +12 -23
- data/lib/beaker/options/hosts_file_parser.rb +16 -24
- data/lib/beaker/options/options_file_parser.rb +3 -6
- data/lib/beaker/options/options_hash.rb +2 -7
- data/lib/beaker/options/parser.rb +86 -102
- data/lib/beaker/options/presets.rb +114 -123
- data/lib/beaker/options/subcommand_options_file_parser.rb +3 -6
- data/lib/beaker/options/validator.rb +26 -31
- data/lib/beaker/perf.rb +22 -27
- data/lib/beaker/platform.rb +38 -46
- data/lib/beaker/result.rb +7 -6
- data/lib/beaker/shared/error_handler.rb +8 -10
- data/lib/beaker/shared/fog_credentials.rb +5 -9
- data/lib/beaker/shared/host_manager.rb +36 -41
- data/lib/beaker/shared/options_resolver.rb +3 -7
- data/lib/beaker/shared/repetition.rb +2 -4
- data/lib/beaker/shared/semvar.rb +37 -41
- data/lib/beaker/shared/timed.rb +0 -3
- data/lib/beaker/shared.rb +1 -1
- data/lib/beaker/ssh_connection.rb +38 -47
- data/lib/beaker/subcommand.rb +17 -24
- data/lib/beaker/subcommands/subcommand_util.rb +4 -4
- data/lib/beaker/tasks/quick_start.rb +4 -9
- data/lib/beaker/tasks/rake_task.rb +25 -27
- data/lib/beaker/tasks/test.rb +4 -4
- data/lib/beaker/test_case.rb +15 -27
- data/lib/beaker/test_suite.rb +35 -39
- data/lib/beaker/test_suite_result.rb +45 -47
- data/lib/beaker/version.rb +1 -1
- data/lib/beaker.rb +5 -6
- data/spec/beaker/cli_spec.rb +121 -142
- data/spec/beaker/command_spec.rb +55 -59
- data/spec/beaker/dsl/assertions_spec.rb +36 -36
- data/spec/beaker/dsl/helpers/host_helpers_spec.rb +110 -131
- data/spec/beaker/dsl/helpers/test_helpers_spec.rb +9 -10
- data/spec/beaker/dsl/helpers/web_helpers_spec.rb +22 -31
- data/spec/beaker/dsl/outcomes_spec.rb +14 -14
- data/spec/beaker/dsl/roles_spec.rb +125 -130
- data/spec/beaker/dsl/structure_spec.rb +169 -158
- data/spec/beaker/dsl/test_tagging_spec.rb +89 -90
- data/spec/beaker/dsl/wrappers_spec.rb +32 -33
- data/spec/beaker/host/aix_spec.rb +14 -14
- data/spec/beaker/host/cisco_spec.rb +84 -94
- data/spec/beaker/host/eos_spec.rb +15 -36
- data/spec/beaker/host/freebsd/exec_spec.rb +3 -6
- data/spec/beaker/host/freebsd/pkg_spec.rb +24 -27
- data/spec/beaker/host/mac/exec_spec.rb +2 -3
- data/spec/beaker/host/mac/group_spec.rb +47 -56
- data/spec/beaker/host/mac/user_spec.rb +53 -62
- data/spec/beaker/host/pswindows/exec_spec.rb +30 -32
- data/spec/beaker/host/pswindows/file_spec.rb +16 -16
- data/spec/beaker/host/pswindows/user_spec.rb +17 -23
- data/spec/beaker/host/pswindows_spec.rb +13 -13
- data/spec/beaker/host/unix/exec_spec.rb +75 -80
- data/spec/beaker/host/unix/file_spec.rb +66 -73
- data/spec/beaker/host/unix/pkg_spec.rb +155 -401
- data/spec/beaker/host/unix_spec.rb +11 -207
- data/spec/beaker/host/windows/exec_spec.rb +30 -32
- data/spec/beaker/host/windows/file_spec.rb +18 -19
- data/spec/beaker/host/windows/group_spec.rb +10 -12
- data/spec/beaker/host/windows/pkg_spec.rb +6 -9
- data/spec/beaker/host/windows/user_spec.rb +17 -23
- data/spec/beaker/host/windows_spec.rb +39 -39
- data/spec/beaker/host_prebuilt_steps_spec.rb +172 -326
- data/spec/beaker/host_spec.rb +204 -284
- data/spec/beaker/hypervisor/hypervisor_spec.rb +36 -61
- data/spec/beaker/localhost_connection_spec.rb +10 -11
- data/spec/beaker/logger_junit_spec.rb +19 -30
- data/spec/beaker/logger_spec.rb +153 -136
- data/spec/beaker/network_manager_spec.rb +23 -23
- data/spec/beaker/options/command_line_parser_spec.rb +20 -23
- data/spec/beaker/options/hosts_file_parser_spec.rb +30 -32
- data/spec/beaker/options/options_file_parser_spec.rb +4 -7
- data/spec/beaker/options/options_hash_spec.rb +4 -6
- data/spec/beaker/options/parser_spec.rb +167 -167
- data/spec/beaker/options/presets_spec.rb +7 -9
- data/spec/beaker/options/subcommand_options_parser_spec.rb +13 -14
- data/spec/beaker/options/validator_spec.rb +10 -11
- data/spec/beaker/perf_spec.rb +18 -21
- data/spec/beaker/platform_spec.rb +25 -36
- data/spec/beaker/shared/error_handler_spec.rb +7 -16
- data/spec/beaker/shared/fog_credentials_spec.rb +29 -29
- data/spec/beaker/shared/host_manager_spec.rb +50 -84
- data/spec/beaker/shared/options_resolver_spec.rb +9 -12
- data/spec/beaker/shared/repetition_spec.rb +17 -24
- data/spec/beaker/shared/semvar_spec.rb +21 -26
- data/spec/beaker/ssh_connection_spec.rb +76 -83
- data/spec/beaker/subcommand/subcommand_util_spec.rb +31 -33
- data/spec/beaker/subcommand_spec.rb +75 -77
- data/spec/beaker/test_case_spec.rb +25 -50
- data/spec/beaker/test_suite_spec.rb +147 -154
- data/spec/helpers.rb +48 -53
- data/spec/matchers.rb +8 -7
- data/spec/mocks.rb +1 -6
- data/spec/spec_helper.rb +0 -1
- metadata +7 -24
- data/acceptance/tests/base/dsl/helpers/host_helpers/deploy_package_repo_test.rb +0 -142
- data/acceptance/tests/base/external_resources_test.rb +0 -31
- data/spec/beaker/host/mac_spec.rb +0 -113
@@ -1,5 +1,4 @@
|
|
1
1
|
test_name 'use the destroy subcommand' do
|
2
|
-
|
3
2
|
def delete_root_folder_contents
|
4
3
|
on default, 'rm -rf /root/* /root/.beaker'
|
5
4
|
end
|
@@ -24,26 +23,25 @@ test_name 'use the destroy subcommand' do
|
|
24
23
|
end
|
25
24
|
|
26
25
|
step 'ensure that `beaker destroy` destroys vmpooler configuration' do
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
26
|
+
delete_root_folder_contents
|
27
|
+
result = on(default, "beaker init --hosts centos6-64")
|
28
|
+
assert_match(/Writing configured options to disk/, result.stdout)
|
29
|
+
assert_equal(0, result.exit_code, "`beaker init` should return a zero exit code")
|
30
|
+
step 'ensure destroy fails to run against an unprovisioned environment' do
|
31
|
+
result = on(default, "beaker destroy", :accept_all_exit_codes => true)
|
32
|
+
assert_match(/Please provision an environment/, result.stdout)
|
33
|
+
assert_equal(1, result.exit_code, "`beaker destroy` should return a non zero exit code")
|
34
|
+
end
|
35
|
+
step 'ensure provision provisions, validates, and configures new hosts' do
|
36
|
+
result = on(default, "beaker provision")
|
37
|
+
assert_match(/Using available host/, result.stdout)
|
38
|
+
assert_equal(0, result.exit_code, "`beaker provision` should return a zero exit code")
|
39
|
+
end
|
40
|
+
step 'ensure destroy will destroy a provisioned environment' do
|
41
|
+
result = on(default, 'beaker destroy')
|
42
|
+
assert_match(/Handing/, result.stdout)
|
43
|
+
assert_equal(0, result.exit_code, "`beaker destroy` should return a zero exit code")
|
44
|
+
end
|
46
45
|
delete_root_folder_contents
|
47
46
|
end
|
48
|
-
|
49
47
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
test_name 'use the init subcommand' do
|
2
|
-
|
3
2
|
SubcommandUtil = Beaker::Subcommands::SubcommandUtil
|
4
3
|
def delete_root_folder_contents
|
5
4
|
on default, 'rm -rf /root/* /root/.beaker'
|
@@ -17,8 +16,8 @@ test_name 'use the init subcommand' do
|
|
17
16
|
subcommand_state = on(default, "cat #{SubcommandUtil::SUBCOMMAND_STATE}").stdout
|
18
17
|
parsed_options = YAML.parse(subcommand_options).to_ruby
|
19
18
|
assert(parsed_options["HOSTS"].count == 1)
|
20
|
-
assert(parsed_options.
|
21
|
-
assert(YAML.parse(subcommand_state).to_ruby.
|
19
|
+
assert(parsed_options.instance_of?(Hash))
|
20
|
+
assert(YAML.parse(subcommand_state).to_ruby.instance_of?(Hash))
|
22
21
|
end
|
23
22
|
|
24
23
|
step 'ensure beaker init saves beaker-run arguments to the subcommand_options.yaml' do
|
data/beaker.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
lib = File.expand_path("lib", __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'beaker/version'
|
@@ -14,17 +13,15 @@ Gem::Specification.new do |s|
|
|
14
13
|
s.license = 'Apache-2.0'
|
15
14
|
|
16
15
|
s.files = `git ls-files`.split("\n")
|
17
|
-
s.
|
18
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
19
17
|
s.require_paths = ["lib"]
|
20
18
|
|
21
|
-
s.required_ruby_version = Gem::Requirement.new('>= 2.
|
19
|
+
s.required_ruby_version = Gem::Requirement.new('>= 2.7')
|
22
20
|
|
23
21
|
# Testing dependencies
|
24
|
-
s.add_development_dependency 'fakefs', '~>
|
22
|
+
s.add_development_dependency 'fakefs', '~> 2.4'
|
25
23
|
s.add_development_dependency 'rake', '~> 13.0'
|
26
24
|
s.add_development_dependency 'rspec', '~> 3.0'
|
27
|
-
s.add_development_dependency 'rspec-its'
|
28
25
|
|
29
26
|
# Documentation dependencies
|
30
27
|
s.add_development_dependency 'yard', '~> 0.9.11'
|
@@ -40,7 +37,7 @@ Gem::Specification.new do |s|
|
|
40
37
|
s.add_runtime_dependency 'net-scp', '>= 1.2', '< 5.0'
|
41
38
|
s.add_runtime_dependency 'net-ssh', '>= 5.0'
|
42
39
|
|
43
|
-
s.add_runtime_dependency 'in-parallel', '>= 0.1', '< 2'
|
40
|
+
s.add_runtime_dependency 'in-parallel', '>= 0.1', '< 2.0'
|
44
41
|
s.add_runtime_dependency 'rsync', '~> 1.0.9'
|
45
42
|
s.add_runtime_dependency 'thor', ['>= 1.0.1', '< 2.0']
|
46
43
|
|
@@ -149,8 +149,6 @@ Usage: beaker [options...]
|
|
149
149
|
(default: false)
|
150
150
|
--repo-proxy Proxy packaging repositories on ubuntu, debian, cumulus and solaris-11
|
151
151
|
(default: false)
|
152
|
-
--add-el-extras Add Extra Packages for Enterprise Linux (EPEL) repository to el-* hosts
|
153
|
-
(default: false)
|
154
152
|
--package-proxy URL Set proxy url for package managers (yum and apt)
|
155
153
|
--[no-]validate Validate that SUTs are correctly provisioned before running tests
|
156
154
|
(default: true)
|
@@ -217,7 +215,7 @@ Values already included in Beaker as defaults for required arguments.
|
|
217
215
|
:preserve_hosts => 'never',
|
218
216
|
:root_keys => false,
|
219
217
|
:quiet => false,
|
220
|
-
:project_root => File.expand_path(File.join(
|
218
|
+
:project_root => File.expand_path(File.join(__dir__, "../")),
|
221
219
|
:xml_dir => 'junit',
|
222
220
|
:xml_file => 'beaker_junit.xml',
|
223
221
|
:xml_time => 'beaker_times.xml',
|
@@ -234,17 +232,10 @@ Values already included in Beaker as defaults for required arguments.
|
|
234
232
|
:fail_mode => 'slow',
|
235
233
|
:accept_all_exit_codes => false,
|
236
234
|
:timesync => false,
|
237
|
-
:disable_iptables => false,
|
238
235
|
:set_env => true,
|
239
236
|
:disable_updates => true,
|
240
237
|
:repo_proxy => false,
|
241
238
|
:package_proxy => false,
|
242
|
-
:add_el_extras => false,
|
243
|
-
:epel_url => "http://mirrors.kernel.org/fedora-epel",
|
244
|
-
:epel_arch => "i386",
|
245
|
-
:epel_7_pkg => "epel-release-7-6.noarch.rpm",
|
246
|
-
:epel_6_pkg => "epel-release-6-8.noarch.rpm",
|
247
|
-
:epel_5_pkg => "epel-release-5-4.noarch.rpm",
|
248
239
|
:consoleport => 443,
|
249
240
|
:pe_dir => '/opt/enterprise/dists',
|
250
241
|
:pe_version_file => 'LATEST',
|
@@ -267,18 +267,18 @@ Now try `beaker run -t test.rb --debug-errors` This will enter a pry or debug co
|
|
267
267
|
39: logger.notify "\n* #{step_name}\n"
|
268
268
|
40: set_current_step_name(step_name)
|
269
269
|
41: if block_given?
|
270
|
-
42: logger.
|
271
|
-
43:
|
272
|
-
44:
|
273
|
-
45:
|
274
|
-
46:
|
275
|
-
47:
|
276
|
-
48:
|
277
|
-
49:
|
278
|
-
50:
|
279
|
-
=> 51:
|
280
|
-
52:
|
281
|
-
53:
|
270
|
+
42: logger.with_indent do
|
271
|
+
43: begin
|
272
|
+
44: yield
|
273
|
+
45: rescue Exception => e
|
274
|
+
46: if(@options.has_key?(:debug_errors) && @options[:debug_errors] == true)
|
275
|
+
47: logger.info("Exception raised during step execution and debug-errors option is set, entering pry. Exception was: #{e.inspect}")
|
276
|
+
48: logger.info("HINT: Use the pry 'backtrace' and 'up' commands to navigate to the test code")
|
277
|
+
49: binding.pry
|
278
|
+
50: end
|
279
|
+
=> 51: raise e
|
280
|
+
52: end
|
281
|
+
53: end
|
282
282
|
54: end
|
283
283
|
55: end
|
284
284
|
|
data/docs/how_to/hosts/eos.md
CHANGED
@@ -2,20 +2,10 @@
|
|
2
2
|
|
3
3
|
EOS is the network device OS from Arista. You can get more details from their [product page](https://www.arista.com/en/products/eos).
|
4
4
|
|
5
|
+
It reaches out to the EOS-specific host code for any information that it needs. You can check out [these methods](blob/master/lib/beaker/host/eos.rb) if you need more information about this.
|
6
|
+
|
5
7
|
# Hypervisors
|
6
8
|
|
7
9
|
EOS has only been developed and tested as a [vmpooler](https://github.com/puppetlabs/vmpooler) host.
|
8
10
|
|
9
11
|
This doesn't mean that it can't be used in another hypervisor, but that Beaker doesn't specifically deal with the details of that hypervisor in creating EOS hosts, if there is anything specific to EOS that will need to be done in provisioning steps.
|
10
|
-
|
11
|
-
# Installation Methods
|
12
|
-
|
13
|
-
## Puppet Enterprise
|
14
|
-
|
15
|
-
`install_pe` should "just work".
|
16
|
-
|
17
|
-
## Open Source
|
18
|
-
|
19
|
-
In order to install a puppet-agent against an EOS host, you'll have to use the [`install_puppet_agent_dev_repo_on`](blob/master/lib/beaker/dsl/install_utils/foss_utils.rb#L1085) method.
|
20
|
-
|
21
|
-
It reaches out to the EOS-specific host code for any information that it needs. You can check out [these methods](blob/master/lib/beaker/host/eos.rb) if you need more information about this.
|
@@ -35,21 +35,3 @@ For our different Open Source variants, check out the sections just below, which
|
|
35
35
|
### Released Open Source Puppet Agents
|
36
36
|
|
37
37
|
To install a released version of Puppet Agent, beaker provides the [`install_puppet_agent_on`](http://www.rubydoc.info/gems/beaker/Beaker/DSL/InstallUtils/FOSSUtils#install_puppet_agent_on-instance_method) method. Please checkout the Rubydocs for more info on this method.
|
38
|
-
|
39
|
-
### Development Open Source Puppet Agents
|
40
|
-
|
41
|
-
To install a development build of Puppet Agent, beaker provides the [`install_puppet_agent_dev_repo_on`](http://www.rubydoc.info/gems/beaker/Beaker/DSL/InstallUtils/FOSSUtils#install_puppet_agent_dev_repo_on-instance_method) method. Please checkout the Rubydocs for more info on this method.
|
42
|
-
|
43
|
-
### PE Promoted Agent Installs
|
44
|
-
|
45
|
-
If you're using this method, then you're going to be downloading the installer from a URL configured like so:
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
http://pm.puppetlabs.com/puppet-agent/#{ pe_version }/#{ puppet_agent_version }/repos
|
49
|
-
```
|
50
|
-
|
51
|
-
`pe_version` is a variable that you can provide using either the host or global property `:pe_ver`. This is usually done in the hosts file, and will default to `4.0.0-rc1` if nothing is specified.
|
52
|
-
|
53
|
-
`puppet_agent_version` is a variable you can provide the value of through the same methods as `pe_version` above. It will default to `latest`.
|
54
|
-
|
55
|
-
Beaker's DSL method to install from this location is [`install_puppet_agent_pe_promoted_repo_on`](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/InstallUtils/FOSSUtils#install_puppet_agent_pe_promoted_repo_on-instance_method). Follow the link to get API-level docs on this method for more info.
|
@@ -24,7 +24,6 @@ To be used for confirming the result of a test is as expected. Beaker include a
|
|
24
24
|
|
25
25
|
* [Minitest assertions](http://docs.seattlerb.org/minitest/Minitest/Assertions.html)
|
26
26
|
* [assert_output](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Assertions#assert_output-instance_method)
|
27
|
-
* [assert_no_match](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Assertions#assert_no_match-instance_method)
|
28
27
|
|
29
28
|
## Helpers
|
30
29
|
|
@@ -42,7 +41,6 @@ DSL methods for host manipulation.
|
|
42
41
|
* [scp_from](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#scp_from-instance_method)
|
43
42
|
* [scp_to](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#scp_to-instance_method)
|
44
43
|
* [rsync_to](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#rsync_to-instance_method)
|
45
|
-
* [deploy_package_repo](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#deploy_package_repo-instance_method)
|
46
44
|
* [create_remote_file](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#create_remote_file-instance_method)
|
47
45
|
* [run_script_on](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#run_script_on-instance_method)
|
48
46
|
* [run_script](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Helpers/HostHelpers#run_script-instance_method)
|
data/lib/beaker/cli.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
module Beaker
|
2
2
|
class CLI
|
3
|
-
VERSION_STRING =
|
4
|
-
|
3
|
+
VERSION_STRING = <<-'ART'
|
4
|
+
wWWWw
|
5
5
|
|o o|
|
6
6
|
| O | %s!
|
7
|
-
|(
|
8
|
-
/
|
7
|
+
|(")|
|
8
|
+
/ \X/ \
|
9
9
|
| V |
|
10
|
-
| | |
|
10
|
+
| | |
|
11
|
+
ART
|
11
12
|
|
12
13
|
attr_reader :logger, :options, :network_manager
|
14
|
+
|
13
15
|
def initialize
|
14
16
|
@timestamp = Time.now
|
15
17
|
# Initialize a logger object prior to parsing; this should be overwritten whence
|
@@ -44,7 +46,7 @@ module Beaker
|
|
44
46
|
exit(0)
|
45
47
|
end
|
46
48
|
|
47
|
-
#add additional paths to the LOAD_PATH
|
49
|
+
# add additional paths to the LOAD_PATH
|
48
50
|
if not @options[:load_path].empty?
|
49
51
|
@options[:load_path].each do |path|
|
50
52
|
$LOAD_PATH << File.expand_path(path)
|
@@ -67,7 +69,7 @@ module Beaker
|
|
67
69
|
# Provision, validate and configure all hosts as defined in the hosts file
|
68
70
|
def provision
|
69
71
|
begin
|
70
|
-
@hosts =
|
72
|
+
@hosts = []
|
71
73
|
initialize_network_manager
|
72
74
|
@network_manager.proxy_package_manager
|
73
75
|
@network_manager.validate
|
@@ -78,7 +80,7 @@ module Beaker
|
|
78
80
|
self
|
79
81
|
end
|
80
82
|
|
81
|
-
#Initialize the network manager so it can initialize hosts for testing for subcommands
|
83
|
+
# Initialize the network manager so it can initialize hosts for testing for subcommands
|
82
84
|
def initialize_network_manager
|
83
85
|
begin
|
84
86
|
@network_manager = Beaker::NetworkManager.new(@options, @logger)
|
@@ -104,31 +106,29 @@ module Beaker
|
|
104
106
|
end
|
105
107
|
|
106
108
|
# Setup perf monitoring if needed
|
107
|
-
if /(aggressive)|(normal)/.match?(@options[:collect_perf_data].to_s)
|
108
|
-
@perf = Beaker::Perf.new( @hosts, @options )
|
109
|
-
end
|
109
|
+
@perf = Beaker::Perf.new(@hosts, @options) if /(aggressive)|(normal)/.match?(@options[:collect_perf_data].to_s)
|
110
110
|
|
111
|
-
#pre acceptance phase
|
111
|
+
# pre acceptance phase
|
112
112
|
run_suite(:pre_suite, :fast)
|
113
113
|
|
114
|
-
#testing phase
|
114
|
+
# testing phase
|
115
115
|
begin
|
116
116
|
run_suite(:tests, @options[:fail_mode])
|
117
|
-
#post acceptance phase
|
117
|
+
# post acceptance phase
|
118
118
|
rescue => e
|
119
|
-
#post acceptance on failure
|
120
|
-
#run post-suite if we are in fail-slow mode
|
119
|
+
# post acceptance on failure
|
120
|
+
# run post-suite if we are in fail-slow mode
|
121
121
|
if @options[:fail_mode].to_s.include?('slow')
|
122
122
|
run_suite(:post_suite)
|
123
123
|
@perf.print_perf_info if defined? @perf
|
124
124
|
end
|
125
125
|
raise e
|
126
126
|
else
|
127
|
-
#post acceptance on success
|
127
|
+
# post acceptance on success
|
128
128
|
run_suite(:post_suite)
|
129
129
|
@perf.print_perf_info if defined? @perf
|
130
130
|
end
|
131
|
-
#cleanup phase
|
131
|
+
# cleanup phase
|
132
132
|
rescue => e
|
133
133
|
begin
|
134
134
|
run_suite(:pre_cleanup)
|
@@ -137,17 +137,15 @@ module Beaker
|
|
137
137
|
@logger.error "Failed running the pre-cleanup suite."
|
138
138
|
end
|
139
139
|
|
140
|
-
#cleanup on error
|
140
|
+
# cleanup on error
|
141
141
|
if /(never)|(onpass)/.match?(@options[:preserve_hosts].to_s)
|
142
142
|
@logger.notify "Cleanup: cleaning up after failed run"
|
143
|
-
if @network_manager
|
144
|
-
@network_manager.cleanup
|
145
|
-
end
|
143
|
+
@network_manager.cleanup if @network_manager
|
146
144
|
else
|
147
145
|
preserve_hosts_file
|
148
146
|
end
|
149
147
|
|
150
|
-
print_reproduction_info(
|
148
|
+
print_reproduction_info(:error)
|
151
149
|
|
152
150
|
@logger.error "Failed running the test suite."
|
153
151
|
puts ''
|
@@ -160,25 +158,21 @@ module Beaker
|
|
160
158
|
@logger.error "Failed running the pre-cleanup suite."
|
161
159
|
end
|
162
160
|
|
163
|
-
#cleanup on success
|
161
|
+
# cleanup on success
|
164
162
|
if /(never)|(onfail)/.match?(@options[:preserve_hosts].to_s)
|
165
163
|
@logger.notify "Cleanup: cleaning up after successful run"
|
166
|
-
if @network_manager
|
167
|
-
@network_manager.cleanup
|
168
|
-
end
|
164
|
+
@network_manager.cleanup if @network_manager
|
169
165
|
else
|
170
166
|
preserve_hosts_file
|
171
167
|
end
|
172
168
|
|
173
|
-
if @logger.is_debug?
|
174
|
-
print_reproduction_info( :debug )
|
175
|
-
end
|
169
|
+
print_reproduction_info(:debug) if @logger.is_debug?
|
176
170
|
end
|
177
171
|
end
|
178
172
|
|
179
|
-
#Run the provided test suite
|
180
|
-
|
181
|
-
|
173
|
+
# Run the provided test suite
|
174
|
+
# @param [Symbol] suite_name The test suite to execute
|
175
|
+
# @param [String] failure_strategy How to proceed after a test failure, 'fast' = stop running tests immediately, 'slow' =
|
182
176
|
# continue to execute tests.
|
183
177
|
def run_suite(suite_name, failure_strategy = nil)
|
184
178
|
if (@options[suite_name].empty?)
|
@@ -195,9 +189,7 @@ module Beaker
|
|
195
189
|
def configured_options
|
196
190
|
result = Beaker::Options::OptionsHash.new
|
197
191
|
@attribution.each do |attribute, setter|
|
198
|
-
if setter != 'preset'
|
199
|
-
result[attribute] = @options[attribute]
|
200
|
-
end
|
192
|
+
result[attribute] = @options[attribute] if setter != 'preset'
|
201
193
|
end
|
202
194
|
result
|
203
195
|
end
|
@@ -223,7 +215,7 @@ module Beaker
|
|
223
215
|
hosts_yaml['HOSTS'] = combined_instance_and_options_hosts
|
224
216
|
hosts_yaml['CONFIG'] = Beaker::Options::OptionsHash.new.merge(hosts_yaml['CONFIG'] || {})
|
225
217
|
# save the rest of the options, excepting the HOSTS that we have already processed
|
226
|
-
hosts_yaml['CONFIG'] = hosts_yaml['CONFIG'].merge(@options.reject{ |k,_v| dontpreserve.match?(k) })
|
218
|
+
hosts_yaml['CONFIG'] = hosts_yaml['CONFIG'].merge(@options.reject { |k, _v| dontpreserve.match?(k) })
|
227
219
|
# remove copy of HOSTS information
|
228
220
|
hosts_yaml['CONFIG']['provision'] = false
|
229
221
|
File.open(preserved_hosts_filename, 'w') do |file|
|
@@ -247,7 +239,7 @@ module Beaker
|
|
247
239
|
end
|
248
240
|
end
|
249
241
|
end
|
250
|
-
|
242
|
+
newly_keyed_hosts_entries
|
251
243
|
end
|
252
244
|
|
253
245
|
# Prints all information required to reproduce the current run & results to the log
|
@@ -255,9 +247,9 @@ module Beaker
|
|
255
247
|
# @see #print_command_line
|
256
248
|
#
|
257
249
|
# @return nil
|
258
|
-
def print_reproduction_info(
|
259
|
-
print_command_line(
|
260
|
-
print_env_vars_affecting_beaker(
|
250
|
+
def print_reproduction_info(log_level = :debug)
|
251
|
+
print_command_line(log_level)
|
252
|
+
print_env_vars_affecting_beaker(log_level)
|
261
253
|
end
|
262
254
|
|
263
255
|
# Prints Environment variables affecting the beaker run (those that
|
@@ -267,24 +259,23 @@ module Beaker
|
|
267
259
|
# print_env_vars_affecting_beaker :error
|
268
260
|
#
|
269
261
|
# @return nil
|
270
|
-
def print_env_vars_affecting_beaker(
|
271
|
-
non_beaker_env_vars =
|
272
|
-
env_var_map = non_beaker_env_vars.
|
273
|
-
set_var = Array(possibly_set_vars).detect {|possible_var| ENV
|
274
|
-
memo[set_var] = ENV
|
275
|
-
memo
|
262
|
+
def print_env_vars_affecting_beaker(log_level)
|
263
|
+
non_beaker_env_vars = %w[BUNDLE_PATH BUNDLE_BIN GEM_HOME GEM_PATH RUBYLIB PATH]
|
264
|
+
env_var_map = non_beaker_env_vars.each_with_object({}) do |possibly_set_vars, memo|
|
265
|
+
set_var = Array(possibly_set_vars).detect { |possible_var| ENV.fetch(possible_var, nil) }
|
266
|
+
memo[set_var] = ENV.fetch(set_var, nil) if set_var
|
276
267
|
end
|
277
268
|
|
278
269
|
env_var_map = env_var_map.merge(Beaker::Options::Presets.new.env_vars)
|
279
270
|
|
280
|
-
@logger.send(
|
271
|
+
@logger.send(log_level, "\nImportant ENV variables that may have affected your run:")
|
281
272
|
env_var_map.each_pair do |var, value|
|
282
273
|
if value.is_a?(Hash)
|
283
|
-
value.each_pair do |
|
284
|
-
@logger.send(
|
274
|
+
value.each_pair do |subvar, subvalue|
|
275
|
+
@logger.send(log_level, " #{subvar}\t\t#{subvalue}")
|
285
276
|
end
|
286
277
|
else
|
287
|
-
@logger.send(
|
278
|
+
@logger.send(log_level, " #{var}\t\t#{value}")
|
288
279
|
end
|
289
280
|
end
|
290
281
|
end
|
@@ -300,27 +291,27 @@ module Beaker
|
|
300
291
|
# Please contact @electrical or the Puppet QE Team for more info, or for requests to support this.
|
301
292
|
#
|
302
293
|
# @return nil
|
303
|
-
def print_command_line(
|
294
|
+
def print_command_line(log_level = :debug)
|
304
295
|
@logger.send(log_level, "\nYou can reproduce this run with:\n")
|
305
296
|
@logger.send(log_level, @options[:command_line])
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
end
|
317
|
-
if has_supported_hypervisor
|
318
|
-
reproducing_command = build_hosts_preserved_reproducing_command(@options[:command_line], @options[:hosts_preserved_yaml_file])
|
319
|
-
@logger.send(log_level, "\nYou can re-run commands against the already provisioned SUT(s) with:\n")
|
320
|
-
@logger.send(log_level, '(docker support is untested for this feature. please reference the docs for more info)') if set_docker_warning
|
321
|
-
@logger.send(log_level, reproducing_command)
|
297
|
+
return unless @options[:hosts_preserved_yaml_file]
|
298
|
+
|
299
|
+
set_docker_warning = false
|
300
|
+
has_supported_hypervisor = false
|
301
|
+
@hosts.each do |host|
|
302
|
+
case host[:hypervisor]
|
303
|
+
when /vagrant|fusion|vmpooler|vcloud/
|
304
|
+
has_supported_hypervisor = true
|
305
|
+
when /docker/
|
306
|
+
set_docker_warning = true
|
322
307
|
end
|
323
308
|
end
|
309
|
+
return unless has_supported_hypervisor
|
310
|
+
|
311
|
+
reproducing_command = build_hosts_preserved_reproducing_command(@options[:command_line], @options[:hosts_preserved_yaml_file])
|
312
|
+
@logger.send(log_level, "\nYou can re-run commands against the already provisioned SUT(s) with:\n")
|
313
|
+
@logger.send(log_level, '(docker support is untested for this feature. please reference the docs for more info)') if set_docker_warning
|
314
|
+
@logger.send(log_level, reproducing_command)
|
324
315
|
end
|
325
316
|
|
326
317
|
# provides a new version of the command given, edited for re-use with a
|
data/lib/beaker/command.rb
CHANGED
@@ -4,7 +4,6 @@ module Beaker
|
|
4
4
|
#
|
5
5
|
# @api public
|
6
6
|
class Command
|
7
|
-
|
8
7
|
# A string representing the (possibly) incomplete command
|
9
8
|
attr_accessor :command
|
10
9
|
|
@@ -56,11 +55,8 @@ module Beaker
|
|
56
55
|
# this is deprecated and will not allow you to use a command line
|
57
56
|
# option of `--environment`, please use ENV instead.
|
58
57
|
[:ENV, :environment, 'environment', 'ENV'].each do |k|
|
59
|
-
|
60
|
-
@environment = @environment.merge(@options.delete(k))
|
61
|
-
end
|
58
|
+
@environment = @environment.merge(@options.delete(k)) if @options[k].is_a?(Hash)
|
62
59
|
end
|
63
|
-
|
64
60
|
end
|
65
61
|
|
66
62
|
# @param [Host] host An object that implements {Beaker::Host}'s
|
@@ -71,17 +67,17 @@ module Beaker
|
|
71
67
|
#
|
72
68
|
# @return [String] This returns the fully formed command line invocation.
|
73
69
|
def cmd_line host, cmd = @command, env = @environment, pc = @prepend_cmds, ac = @append_cmds
|
74
|
-
env_string = host.environment_string(
|
75
|
-
prepend_commands = host.prepend_commands(
|
76
|
-
append_commands = host.append_commands(
|
70
|
+
env_string = host.environment_string(env)
|
71
|
+
prepend_commands = host.prepend_commands(cmd, pc, :cmd_exe => @cmdexe)
|
72
|
+
append_commands = host.append_commands(cmd, ac, :cmd_exe => @cmdexe)
|
77
73
|
|
78
74
|
# This will cause things like `puppet -t -v agent` which is maybe bad.
|
79
|
-
if host[:platform]&.include?('cisco_ios_xr')
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
cmd_line_array.compact.reject(
|
75
|
+
cmd_line_array = if host[:platform]&.include?('cisco_ios_xr')
|
76
|
+
[prepend_commands, env_string, cmd, options_string, args_string, append_commands]
|
77
|
+
else
|
78
|
+
[env_string, prepend_commands, cmd, options_string, args_string, append_commands]
|
79
|
+
end
|
80
|
+
cmd_line_array.compact.reject(&:empty?).join(' ')
|
85
81
|
end
|
86
82
|
|
87
83
|
# @param [Hash] opts These are the options that the command takes
|
@@ -99,9 +95,9 @@ module Beaker
|
|
99
95
|
end
|
100
96
|
end
|
101
97
|
|
102
|
-
short_flags, long_flags = flags.partition {|flag| flag.to_s.length == 1 }
|
103
|
-
parsed_short_flags = short_flags.map {|f| "-#{f}" }
|
104
|
-
parsed_long_flags = long_flags.map {|f| "--#{f}" }
|
98
|
+
short_flags, long_flags = flags.partition { |flag| flag.to_s.length == 1 }
|
99
|
+
parsed_short_flags = short_flags.map { |f| "-#{f}" }
|
100
|
+
parsed_long_flags = long_flags.map { |f| "--#{f}" }
|
105
101
|
|
106
102
|
short_opts, long_opts = {}, {}
|
107
103
|
options.each_key do |key|
|
@@ -111,8 +107,8 @@ module Beaker
|
|
111
107
|
long_opts[key] = options[key]
|
112
108
|
end
|
113
109
|
end
|
114
|
-
parsed_short_opts = short_opts.map {|k,v| "-#{k}=#{v}" }
|
115
|
-
parsed_long_opts = long_opts.map {|k,v| "--#{k}=#{v}" }
|
110
|
+
parsed_short_opts = short_opts.map { |k, v| "-#{k}=#{v}" }
|
111
|
+
parsed_long_opts = long_opts.map { |k, v| "--#{k}=#{v}" }
|
116
112
|
|
117
113
|
return (parsed_short_flags +
|
118
114
|
parsed_long_flags +
|
@@ -125,18 +121,15 @@ module Beaker
|
|
125
121
|
def args_string args = @args
|
126
122
|
args.flatten.compact.join(' ')
|
127
123
|
end
|
128
|
-
|
129
|
-
|
130
|
-
|
131
124
|
end
|
132
125
|
|
133
126
|
class PuppetCommand < Command
|
134
127
|
def initialize *args
|
135
128
|
command = "puppet #{args.shift}"
|
136
|
-
opts = args.last.is_a?(Hash) ? args.pop :
|
137
|
-
opts['ENV'] ||=
|
129
|
+
opts = args.last.is_a?(Hash) ? args.pop : {}
|
130
|
+
opts['ENV'] ||= {}
|
138
131
|
opts[:cmdexe] = true
|
139
|
-
super(
|
132
|
+
super(command, args, opts)
|
140
133
|
end
|
141
134
|
end
|
142
135
|
|
@@ -147,7 +140,6 @@ module Beaker
|
|
147
140
|
end
|
148
141
|
|
149
142
|
class SedCommand < Command
|
150
|
-
|
151
143
|
# sets up a SedCommand for a particular platform
|
152
144
|
#
|
153
145
|
# the purpose is to abstract away platform-dependent details of the sed command
|
@@ -168,8 +160,8 @@ module Beaker
|
|
168
160
|
command << " > #{temp_file} && mv #{temp_file} #{filename} && rm -f #{temp_file}"
|
169
161
|
end
|
170
162
|
args = []
|
171
|
-
opts['ENV'] ||=
|
172
|
-
super(
|
163
|
+
opts['ENV'] ||= {}
|
164
|
+
super(command, args, opts)
|
173
165
|
end
|
174
166
|
end
|
175
167
|
end
|
@@ -3,7 +3,7 @@ require 'minitest/test'
|
|
3
3
|
module Beaker
|
4
4
|
module CommandFactory
|
5
5
|
include Minitest::Assertions
|
6
|
-
#Why do we need this accessor?
|
6
|
+
# Why do we need this accessor?
|
7
7
|
# https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L8-L12
|
8
8
|
# Protocol: Nearly everything here boils up to +assert+, which
|
9
9
|
# expects to be able to increment an instance accessor named
|
@@ -11,6 +11,7 @@ module Beaker
|
|
11
11
|
# provided by the thing including Assertions. See Minitest::Runnable
|
12
12
|
# for an example.
|
13
13
|
attr_writer :assertions
|
14
|
+
|
14
15
|
def assertions
|
15
16
|
@assertions || 0
|
16
17
|
end
|
@@ -27,7 +28,7 @@ module Beaker
|
|
27
28
|
#
|
28
29
|
# @api private
|
29
30
|
# @return [String] Stdout from command execution
|
30
|
-
def execute(command, options={})
|
31
|
+
def execute(command, options = {})
|
31
32
|
cmd_create_options = {}
|
32
33
|
exec_opts = options.dup
|
33
34
|
cmd_create_options[:prepend_cmds] = exec_opts.delete(:prepend_cmds) || nil
|