diff --git a/acceptance/tests/face/loadable_from_modules.rb b/acceptance/tests/face/loadable_from_modules.rb index aa00495f3..7ff598247 100644 --- a/acceptance/tests/face/loadable_from_modules.rb +++ b/acceptance/tests/face/loadable_from_modules.rb @@ -1,85 +1,85 @@ test_name "Exercise loading a face from a module" # Because the module tool does not work on windows, we can't run this test there confine :except, :platform => 'windows' require 'puppet/acceptance/temp_file_utils' extend Puppet::Acceptance::TempFileUtils initialize_temp_dirs agents.each do |agent| dev_modulepath = get_test_file_path(agent, 'dev/modules') user_modulepath = get_test_file_path(agent, 'user/modules') # make sure that we use the modulepath from the dev environment puppetconf = get_test_file_path(agent, 'puppet.conf') on agent, puppet("config", "set", "environment", "dev", "--section", "user", "--config", puppetconf) on agent, puppet("config", "set", "modulepath", user_modulepath, "--section", "user", "--config", puppetconf) on agent, puppet("config", "set", "modulepath", dev_modulepath, "--section", "user", "--config", puppetconf) - on agent, 'rm -rf puppetlabs-helloworld' + on agent, 'rm -rf helloworld' on agent, puppet("module", "generate", "puppetlabs-helloworld", "--skip-interview") - mkdirs agent, 'puppetlabs-helloworld/lib/puppet/application' - mkdirs agent, 'puppetlabs-helloworld/lib/puppet/face' + mkdirs agent, 'helloworld/lib/puppet/application' + mkdirs agent, 'helloworld/lib/puppet/face' # copy application, face, and utility module - create_remote_file(agent, "puppetlabs-helloworld/lib/puppet/application/helloworld.rb", <<'EOM') + create_remote_file(agent, "helloworld/lib/puppet/application/helloworld.rb", <<'EOM') require 'puppet/face' require 'puppet/application/face_base' class Puppet::Application::Helloworld < Puppet::Application::FaceBase end EOM - create_remote_file(agent, "puppetlabs-helloworld/lib/puppet/face/helloworld.rb", <<'EOM') + create_remote_file(agent, "helloworld/lib/puppet/face/helloworld.rb", <<'EOM') Puppet::Face.define(:helloworld, '0.1.0') do summary "Hello world face" description "This is the hello world face" action 'actionprint' do summary "Prints hello world from an action" when_invoked do |options| puts "Hello world from an action" end end action 'moduleprint' do summary "Prints hello world from a required module" when_invoked do |options| require 'puppet/helloworld.rb' Puppet::Helloworld.print end end end EOM - create_remote_file(agent, "puppetlabs-helloworld/lib/puppet/helloworld.rb", <<'EOM') + create_remote_file(agent, "helloworld/lib/puppet/helloworld.rb", <<'EOM') module Puppet::Helloworld def print puts "Hello world from a required module" end module_function :print end EOM - on agent, puppet('module', 'build', 'puppetlabs-helloworld') - on agent, puppet('module', 'install', '--ignore-dependencies', '--target-dir', dev_modulepath, 'puppetlabs-helloworld/pkg/puppetlabs-helloworld-0.1.0.tar.gz') + on agent, puppet('module', 'build', 'helloworld') + on agent, puppet('module', 'install', '--ignore-dependencies', '--target-dir', dev_modulepath, 'helloworld/pkg/puppetlabs-helloworld-0.1.0.tar.gz') on(agent, puppet('help', '--config', puppetconf)) do assert_match(/helloworld\s*Hello world face/, stdout, "Face missing from list of available subcommands") end on(agent, puppet('help', 'helloworld', '--config', puppetconf)) do assert_match(/This is the hello world face/, stdout, "Descripion help missing") assert_match(/moduleprint\s*Prints hello world from a required module/, stdout, "help for moduleprint action missing") assert_match(/actionprint\s*Prints hello world from an action/, stdout, "help for actionprint action missing") end on(agent, puppet('helloworld', 'actionprint', '--config', puppetconf)) do assert_match(/^Hello world from an action$/, stdout, "face did not print hello world") end on(agent, puppet('helloworld', 'moduleprint', '--config', puppetconf)) do assert_match(/^Hello world from a required module$/, stdout, "face did not load module to print hello world") end end diff --git a/acceptance/tests/modules/build/build_agent.rb b/acceptance/tests/modules/build/build_agent.rb index c65592db6..79e890bbd 100644 --- a/acceptance/tests/modules/build/build_agent.rb +++ b/acceptance/tests/modules/build/build_agent.rb @@ -1,15 +1,15 @@ test_name "puppet module build (agent)" agents.each do |agent| teardown do - on agent, 'rm -rf foo-bar' + on agent, 'rm -rf bar' end step 'generate' on(agent, puppet('module generate foo-bar --skip-interview')) step 'build' - on(agent, puppet('module build foo-bar')) do - assert_match(/Module built: .*\/foo-bar\/pkg\/foo-bar-.*\.tar\.gz/, stdout) + on(agent, puppet('module build bar')) do + assert_match(/Module built: .*\/bar\/pkg\/foo-bar-.*\.tar\.gz/, stdout) end end