Please review pull request #509: (#12692) Don't hard code CI paths into tests opened by (justinstoller)
Description:
Prior to this commit we hard coded paths in two tests that depended on
our CI system directory structure. This made it hard to use our
acceptance suite without also including the exact same setup. It also
increased the cost of maintaining our CI setup.
This uses a path relative to the test itself (the file that it SCPs
should always be in the same directory as the test itself)
Signed-off-by: Justin Stoller [email protected]
There are no immediate plans to change this directory structure,
so there no urgency for the pull request, it should be merged up of course,
and you can view the test results here:
- Opened: Thu Feb 16 18:46:20 UTC 2012
- Based on: puppetlabs:2.6.x (311848a4c74b0348aaa96ea725cb9291bdd19d6e)
- Requested merge: justinstoller:bug/2.6.x/12692-dont_hard_code_paths_in_tests (60b7aa540ca47035ec6e2ce0d43ed4fcc1facdc0)
Diff follows:
diff --git a/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb b/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb
index b2113c3..0644247 100755
--- a/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb
+++ b/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb
@@ -5,7 +5,7 @@
hosts.each do |host|
if host['platform'].include?('el-')
- run_script_on(host,'acceptance-tests/tests/resource/service/ticket_4123_should_list_all_running_redhat.sh')
+ run_script_on(host, File.join(File.dirname(__FILE__), 'ticket_4123_should_list_all_running_redhat.sh'))
else
skip_test "Test not supported on this plaform"
end
diff --git a/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb b/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb
index 2b9b2b7..7ba3c1a 100755
--- a/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb
+++ b/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb
@@ -7,6 +7,6 @@
unless host['platform'].include?('el-')
skip_test "Test not supported on this plaform"
else
- run_script_on(host,'acceptance-tests/tests/resource/service/ticket_4124_should_list_all_disabled.sh')
+ run_script_on(host, File.join(File.dirname(__FILE__), 'ticket_4124_should_list_all_disabled.sh'))
end
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
