cookbooks/aws-parallelcluster-environment/spec/unit/resources/lustre_mount_spec.rb [361:377]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              action :unmount
            end
          end
        end

        before do
          stub_command("mount | grep ' /shared_dir_1 '").and_return(false)
          stub_command("mount | grep ' /shared_dir_2 '").and_return(true)
          allow(Dir).to receive(:exist?).with("/shared_dir_1").and_return(true)
          allow(Dir).to receive(:empty?).with("/shared_dir_1").and_return(true)
          allow(Dir).to receive(:exist?).with("/shared_dir_2").and_return(true)
          allow(Dir).to receive(:empty?).with("/shared_dir_2").and_return(false)
          allow_any_instance_of(Object).to receive(:aws_domain_for_fsx).and_return("AWS_DOMAIN_FOR_FSX")
        end

        it 'unmounts fsx only if mounted' do
          is_expected.not_to run_execute('unmount fsx /shared_dir_1')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cookbooks/aws-parallelcluster-environment/spec/unit/resources/lustre_mount_spec.rb [421:437]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              action :unmount
            end
          end
        end

        before do
          stub_command("mount | grep ' /shared_dir_1 '").and_return(false)
          stub_command("mount | grep ' /shared_dir_2 '").and_return(true)
          allow(Dir).to receive(:exist?).with("/shared_dir_1").and_return(true)
          allow(Dir).to receive(:empty?).with("/shared_dir_1").and_return(true)
          allow(Dir).to receive(:exist?).with("/shared_dir_2").and_return(true)
          allow(Dir).to receive(:empty?).with("/shared_dir_2").and_return(false)
          allow_any_instance_of(Object).to receive(:aws_domain_for_fsx).and_return("AWS_DOMAIN_FOR_FSX")
        end

        it 'unmounts fsx only if mounted' do
          is_expected.not_to run_execute('unmount fsx /shared_dir_1')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



