Sha256: 3aca5126e9136e2bce63af3237f9a949ef7f27dfdbf63a41a50a8ceb45a076e7
Contents?: true
Size: 1.24 KB
Versions: 81
Compression:
Stored size: 1.24 KB
Contents
test_name 'use the init subcommand' do SubcommandUtil = Beaker::Subcommands::SubcommandUtil def delete_root_folder_contents on default, 'rm -rf /root/* /root/.beaker' end step 'ensure beaker init requires hosts flag' do result = on(default, 'beaker init') assert_match(/No value(.+)--hosts/, result.raw_output) end step 'ensure beaker init writes YAML configuration files to disk' do delete_root_folder_contents on(default, 'beaker init --hosts centos6-64') subcommand_options = on(default, "cat #{SubcommandUtil::SUBCOMMAND_OPTIONS}").stdout subcommand_state = on(default, "cat #{SubcommandUtil::SUBCOMMAND_STATE}").stdout parsed_options = YAML.parse(subcommand_options).to_ruby assert(parsed_options["HOSTS"].count == 1) assert(parsed_options.class == Hash) assert(YAML.parse(subcommand_state).to_ruby.class == Hash) end step 'ensure beaker init saves beaker-run arguments to the subcommand_options.yaml' do delete_root_folder_contents on(default, 'beaker init --log-level verbose --hosts centos6-64') subcommand_options = on(default, "cat #{SubcommandUtil::SUBCOMMAND_OPTIONS}").stdout hash = YAML.parse(subcommand_options).to_ruby assert_equal('verbose', hash['log_level']) end end
Version data entries
81 entries across 81 versions & 1 rubygems