Server IP : 66.29.132.122 / Your IP : 18.223.206.69 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 : /proc/self/root/opt/puppetlabs/puppet/vendor_modules/mount_core/spec/acceptance/tests/ |
Upload File : |
require 'spec_helper_acceptance' require 'mount_utils' RSpec.context 'when managing mounts' do agents.each do |agent| context "on #{agent}" do include_context('mount context', agent) it 'modifies an entry in the filesystem table' do step '(setup) create mount point' on(agent, "mkdir /#{name}", acceptable_exit_codes: [0, 1]) step '(setup) create new filesystem to be mounted' MountUtils.create_filesystem(agent, name) step '(setup) add entry to the filesystem table' MountUtils.add_entry_to_filesystem_table(agent, name) step '(setup) mount entry' on(agent, "mount /#{name}") step 'modify a mount with puppet (defined)' args = ['ensure=defined', 'fstype=bogus'] on(agent, puppet_resource('mount', "/#{name}", args)) step 'verify entry is updated in filesystem table' on(agent, "cat #{fs_file}") do |res| fail_test "attributes not updated for the mount #{name}" unless res.stdout.include? 'bogus' end end it 'modifies an entry with whitespace in the filesystem table' do step '(setup) create mount point' on(agent, "mkdir '/#{name_w_whitespace}'", acceptable_exit_codes: [0, 1]) step '(setup) create new filesystem to be mounted' MountUtils.create_filesystem(agent, name_w_whitespace) step '(setup) add entry to the filesystem table' MountUtils.add_entry_to_filesystem_table(agent, name_w_whitespace) step '(setup) mount entry' on(agent, "mount '/#{name_w_whitespace}'") step 'modify a mount with puppet (defined)' args = ['ensure=defined', 'fstype=bogus'] on(agent, puppet_resource('mount', "'/#{name_w_whitespace}'", args)) step 'verify entry is updated in filesystem table' on(agent, "cat #{fs_file}") do |res| fail_test "attributes not updated for the mount '#{name_w_whitespace}'" unless res.stdout.include? 'bogus' end end end end end