acceptance/lib/helpers/test_helper.rb in beaker-3.37.0 vs acceptance/lib/helpers/test_helper.rb in beaker-4.0.0

- old
+ new

@@ -6,37 +6,9 @@ # TODO: fix via: https://tickets.puppetlabs.com/browse/BKR-464 def test_scp_error_on_close? !!ENV["BEAKER_TEST_SCP_ERROR_ON_CLOSE"] end -# NOTE: currently there is an issue with the tmpdir_on helper on cygwin and OS X -# platforms: the `chown` command always fails with an error about not -# recognizing the Administrator:Administrator user/group. Also, the call to -# check user presence via `getent` also fails. Until this is fixed, we add this -# shim that delegates to a non-`chown`/non-`getent`-executing version for the -# purposes of our test setup. -# -# TODO: fix via: https://tickets.puppetlabs.com/browse/BKR-496 -def tmpdir_on(hosts, path_prefix = '', user=nil) - first_host = Array(hosts).first - - return create_tmpdir_on(hosts, path_prefix, user) unless \ - first_host.is_cygwin? or first_host.platform =~ /osx/ - - block_on hosts do | host | - # use default user logged into this host - if not user - user = host['user'] - end - - if defined? host.tmpdir - host.tmpdir(path_prefix) - else - raise "Host platform not supported by `tmpdir_on`." - end - end -end - # Returns the absolute path where file fixtures are located. def fixture_path @fixture_path ||= File.expand_path(File.join(__FILE__, '..', '..', '..', 'fixtures', 'files')) end