beaker 4.22.0 → 4.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/beaker/host/unix/exec.rb +3 -3
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/host/unix/exec_spec.rb +4 -4
- data/spec/beaker/host_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a089feb0e8311631a3778e1839e5942694ec2e9f14bb873fbfb07d5ae854bca
|
4
|
+
data.tar.gz: b0e75901ec90f523a2b2f276658e8ede706a0fb3df3f09fcd58779263a28d630
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfb8cfe1965440e36c4e8093548a454c0de51100d1ec5c4a5d001c083fc20aa5b2715301abba1b2a4ddb3425701c51298e4cbcb41f965896a41f59c003c2b97d
|
7
|
+
data.tar.gz: 39fb8a21b0e289c81b8967deb089bb50418a726d0bec337cec4ad6230d4b5ce3587b37c2ee1144cef61d1f944b77df1a1f6cc0a2ae79c9214efe66c55dcd463a
|
data/CHANGELOG.md
CHANGED
@@ -20,7 +20,13 @@ The headers used in [Keep a Changelog](http://keepachangelog.com) are:
|
|
20
20
|
- Fixed - for any bug fixes.
|
21
21
|
- Security - in case of vulnerabilities.
|
22
22
|
|
23
|
-
# [Unreleased](https://github.com/puppetlabs/beaker/compare/4.22.
|
23
|
+
# [Unreleased](https://github.com/puppetlabs/beaker/compare/4.22.1...master)
|
24
|
+
|
25
|
+
# [4.22.1](https://github.com/puppetlabs/beaker/compare/4.22.0...4.22.1)
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
|
29
|
+
- Removed single quotes around paths for file operation commands on `Host` https://github.com/puppetlabs/beaker/pull/1642
|
24
30
|
|
25
31
|
# [4.22.0](https://github.com/puppetlabs/beaker/compare/4.21.0...4.22.0) - 2020-05-08
|
26
32
|
|
@@ -127,7 +127,7 @@ module Unix::Exec
|
|
127
127
|
# @param [String] dir The directory structure to create on the host
|
128
128
|
# @return [Boolean] True, if directory construction succeeded, otherwise False
|
129
129
|
def mkdir_p dir
|
130
|
-
cmd = "mkdir -p
|
130
|
+
cmd = "mkdir -p #{dir}"
|
131
131
|
result = exec(Beaker::Command.new(cmd), :acceptable_exit_codes => [0, 1])
|
132
132
|
result.exit_code == 0
|
133
133
|
end
|
@@ -135,7 +135,7 @@ module Unix::Exec
|
|
135
135
|
# Recursively remove the path provided
|
136
136
|
# @param [String] path The path to remove
|
137
137
|
def rm_rf path
|
138
|
-
execute("rm -rf
|
138
|
+
execute("rm -rf #{path}")
|
139
139
|
end
|
140
140
|
|
141
141
|
# Move the origin to destination. The destination is removed prior to moving.
|
@@ -144,7 +144,7 @@ module Unix::Exec
|
|
144
144
|
# @param [Boolean] rm Remove the destination prior to move
|
145
145
|
def mv orig, dest, rm=true
|
146
146
|
rm_rf dest unless !rm
|
147
|
-
execute("mv
|
147
|
+
execute("mv #{orig} #{dest}")
|
148
148
|
end
|
149
149
|
|
150
150
|
# Attempt to ping the provided target hostname
|
data/lib/beaker/version.rb
CHANGED
@@ -29,7 +29,7 @@ module Beaker
|
|
29
29
|
|
30
30
|
it "deletes" do
|
31
31
|
path = '/path/to/delete'
|
32
|
-
expect( instance ).to receive(:execute).with("rm -rf
|
32
|
+
expect( instance ).to receive(:execute).with("rm -rf #{path}").and_return(0)
|
33
33
|
expect( instance.rm_rf(path) ).to be === 0
|
34
34
|
end
|
35
35
|
end
|
@@ -39,14 +39,14 @@ module Beaker
|
|
39
39
|
let(:destination) { '/destination/path/of/content' }
|
40
40
|
|
41
41
|
it 'rm first' do
|
42
|
-
expect( instance ).to receive(:execute).with("rm -rf
|
43
|
-
expect( instance ).to receive(:execute).with("mv
|
42
|
+
expect( instance ).to receive(:execute).with("rm -rf #{destination}").and_return(0)
|
43
|
+
expect( instance ).to receive(:execute).with("mv #{origin} #{destination}").and_return(0)
|
44
44
|
expect( instance.mv(origin, destination) ).to be === 0
|
45
45
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it 'does not rm' do
|
49
|
-
expect( instance ).to receive(:execute).with("mv
|
49
|
+
expect( instance ).to receive(:execute).with("mv #{origin} #{destination}").and_return(0)
|
50
50
|
expect( instance.mv(origin, destination, false) ).to be === 0
|
51
51
|
end
|
52
52
|
end
|
data/spec/beaker/host_spec.rb
CHANGED
@@ -325,7 +325,7 @@ module Beaker
|
|
325
325
|
allow( result ).to receive( :exit_code ).and_return( 0 )
|
326
326
|
allow( host ).to receive( :exec ).and_return( result )
|
327
327
|
|
328
|
-
expect( Beaker::Command ).to receive(:new).with("mkdir -p
|
328
|
+
expect( Beaker::Command ).to receive(:new).with("mkdir -p test/test/test")
|
329
329
|
expect( host.mkdir_p('test/test/test') ).to be == true
|
330
330
|
|
331
331
|
end
|
@@ -337,7 +337,7 @@ module Beaker
|
|
337
337
|
allow( result ).to receive( :exit_code ).and_return( 0 )
|
338
338
|
allow( host ).to receive( :exec ).and_return( result )
|
339
339
|
|
340
|
-
expect( Beaker::Command ).to receive(:new).with("mkdir -p
|
340
|
+
expect( Beaker::Command ).to receive(:new).with("mkdir -p test/test/test")
|
341
341
|
expect( host.mkdir_p('test/test/test') ).to be == true
|
342
342
|
|
343
343
|
end
|