Server IP : 66.29.132.122 / Your IP : 3.149.235.108 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/puppetlabs/puppet/vendor_modules/zone_core/spec/acceptance/tests/ |
Upload File : |
require 'spec_helper_acceptance' require 'zone_util' RSpec.context 'zone manages path' do after(:all) do solaris_agents.each do |agent| ZoneUtils.clean(agent) end end let(:zone_with_path1) do <<-MANIFEST zone { 'tstzone': ensure => configured, iptype => shared, path => '/tstzones/mnt' } MANIFEST end let(:zone_with_path2) do <<-MANIFEST zone { 'tstzone': ensure => configured, iptype => shared, path => '/tstzones/mnt2' } MANIFEST end solaris_agents.each do |agent| context "on #{agent}" do it 'creates a zone with a path' do step 'Zone: path - required parameter (+)' apply_manifest_on(agent, zone_with_path1) do |result| assert_match(%r{ensure: created}, result.stdout, "err: #{agent}") end step 'Zone: path - should change the path if it is switched before install' apply_manifest_on(agent, zone_with_path2) do |result| assert_match(%r{path changed '.tstzones.mnt'.* to '.tstzones.mnt2'}, result.stdout, "err: #{agent}") end step 'Zone: path - verify the path is correct' on agent, '/usr/sbin/zonecfg -z tstzone export' do |result| assert_match(%r{set zonepath=.*mnt2}, result.stdout, "err: #{agent}") end step 'Zone: path - revert to original path' apply_manifest_on(agent, zone_with_path1) do |result| assert_match(%r{path changed '.tstzones.mnt2'.* to '.tstzones.mnt'}, result.stdout, "err: #{agent}") end step 'Zone: path - verify that we have correct path' on agent, '/usr/sbin/zonecfg -z tstzone export' do |result| assert_match(%r{set zonepath=.tstzones.mnt}, result.stdout, "err: #{agent}") end end end end end