Added/updated unit tests for WinRM mkdir/rm command filters
This commit is contained in:
parent
120b15bc39
commit
08732f5a39
|
@ -52,14 +52,27 @@ describe VagrantPlugins::CommunicatorWinRM::CommandFilter, unit: true do
|
|||
"if (Test-Path $p) {")
|
||||
end
|
||||
|
||||
it 'filters out rm -Rf commands' do
|
||||
it 'filters out rm recurse commands' do
|
||||
expect(subject.filter('rm -Rf /some/dir')).to eq(
|
||||
"rm '/some/dir' -recurse -force")
|
||||
"rm /some/dir -recurse -force")
|
||||
expect(subject.filter('rm -fr /some/dir')).to eq(
|
||||
"rm /some/dir -recurse -force")
|
||||
expect(subject.filter('rm -r /some/dir')).to eq(
|
||||
"rm /some/dir -recurse -force")
|
||||
end
|
||||
|
||||
it 'filters out rm commands' do
|
||||
expect(subject.filter('rm /some/dir')).to eq(
|
||||
"rm '/some/dir' -force")
|
||||
"rm /some/dir -force")
|
||||
expect(subject.filter('rm -f /some/dir')).to eq(
|
||||
"rm /some/dir -force")
|
||||
end
|
||||
|
||||
it 'filters out mkdir commands' do
|
||||
expect(subject.filter('mkdir /some/dir')).to eq(
|
||||
"mkdir /some/dir -force")
|
||||
expect(subject.filter('mkdir -p /some/dir')).to eq(
|
||||
"mkdir /some/dir -force")
|
||||
end
|
||||
|
||||
it 'filters out chown commands' do
|
||||
|
|
Loading…
Reference in New Issue