403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.17.175.89
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/puppetlabs/puppet/vendor_modules/zone_core/spec/acceptance/tests/zone_ensure_spec.rb
require 'spec_helper_acceptance'
require 'zone_util'

RSpec.context 'Zone: should be created and removed' do
  after(:all) do
    solaris_agents.each do |agent|
      ZoneUtils.clean(agent)
    end
  end

  let(:running_manifest) do
    <<-MANIFEST
      zone { 'tstzone' :
        ensure => running,
        path   =>'/tstzones/mnt'
      }
    MANIFEST
  end

  let(:absent_manifest) do
    <<-MANIFEST
      zone { 'tstzone':
        ensure => absent
      }
    MANIFEST
  end

  solaris_agents.each do |agent|
    context "on #{agent}" do
      it 'creates and deletes a zone' do
        step 'Zone: make it running'
        step 'progress would be logged to agent:/var/log/zones/zoneadm.<date>.<zonename>.install'
        step 'install log would be at agent:/system/volatile/install.<id>/install_log'
        apply_manifest_on(agent, running_manifest) do |result|
          assert_match(%r{created}, result.stdout, "err: #{agent}")
        end

        on(agent, 'zoneadm list -cp') do |result|
          assert_match(%r{tstzone}, result.stdout, "err: #{agent}")
        end

        on(agent, 'zoneadm -z tstzone verify')

        # should be idempotent
        apply_manifest_on(agent, running_manifest) do |result|
          refute_match(%r{created|changed|removed}, result.stdout, "err: #{agent}")
        end

        step 'Zone: ensure can remove'
        step 'progress would be logged to agent:/var/log/zones/zoneadm.<date>.<zonename>.uninstall'
        apply_manifest_on(agent, absent_manifest) do |result|
          assert_match(%r{ensure: removed}, result.stdout, "err: #{agent}")
        end
        on(agent, 'zoneadm list -cp') do |result|
          refute_match(%r{tstzone}, result.stdout, "err: #{agent}")
        end
      end
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit