serverspec 0.15.5 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/serverspec/type/command.rb +8 -9
- data/lib/serverspec/version.rb +1 -1
- data/spec/aix/command_spec.rb +4 -6
- data/spec/darwin/command_spec.rb +4 -6
- data/spec/debian/command_spec.rb +4 -6
- data/spec/freebsd/command_spec.rb +4 -6
- data/spec/gentoo/command_spec.rb +4 -6
- data/spec/plamo/command_spec.rb +4 -6
- data/spec/redhat/command_spec.rb +4 -6
- data/spec/solaris/command_spec.rb +4 -6
- data/spec/solaris11/command_spec.rb +4 -6
- data/spec/windows/command_spec.rb +4 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f9e60dffbf889e149689ae2ea4756c01481327c
|
4
|
+
data.tar.gz: edb2f01c08ea0b3dac4756db8d3a3e3d5e335946
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4824f8eb7bec9311ba75c841fcab072ba5fc798ba1d6549d9a1b36c55ed6b73fd280050a360c2330b35275166365a4040d99a8002f11d1fbeb96d5084586e00
|
7
|
+
data.tar.gz: 4f7dcf8119978f055aa659c65f998db32ec3d4cf0b270f76b2dbdd7b433485b369ace1873d18c7061ba8e0a0d2b1b22389f1c6b82a9b58f6e7e720db6da1e0f2
|
@@ -14,13 +14,10 @@ module Serverspec
|
|
14
14
|
|
15
15
|
def return_stderr?(content)
|
16
16
|
ret = backend.run_command(@name)
|
17
|
-
# In ssh access with pty, stderr is merged to stdout
|
18
|
-
# See http://stackoverflow.com/questions/7937651/receiving-extended-data-with-ssh-using-twisted-conch-as-client
|
19
|
-
# So I use stdout instead of stderr
|
20
17
|
if content.instance_of?(Regexp)
|
21
|
-
ret.
|
18
|
+
ret.stderr =~ content
|
22
19
|
else
|
23
|
-
ret.
|
20
|
+
ret.stderr.strip == content
|
24
21
|
end
|
25
22
|
end
|
26
23
|
|
@@ -36,10 +33,12 @@ module Serverspec
|
|
36
33
|
@result
|
37
34
|
end
|
38
35
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
36
|
+
def stderr
|
37
|
+
if @result.nil?
|
38
|
+
@result = backend.run_command(@name).stderr
|
39
|
+
end
|
40
|
+
@result
|
41
|
+
end
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
data/lib/serverspec/version.rb
CHANGED
data/spec/aix/command_spec.rb
CHANGED
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
data/spec/darwin/command_spec.rb
CHANGED
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
data/spec/debian/command_spec.rb
CHANGED
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
data/spec/gentoo/command_spec.rb
CHANGED
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
data/spec/plamo/command_spec.rb
CHANGED
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
data/spec/redhat/command_spec.rb
CHANGED
@@ -24,21 +24,21 @@ describe 'regexp matching of stdout' do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
describe command('cat /etc/resolv.conf') do
|
27
|
-
let(:
|
27
|
+
let(:stderr) { "No such file or directory\r\n" }
|
28
28
|
it { should return_stderr("No such file or directory") }
|
29
29
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
30
30
|
end
|
31
31
|
|
32
32
|
describe 'complete matching of stderr' do
|
33
33
|
context command('cat /etc/resolv.conf') do
|
34
|
-
let(:
|
35
|
-
it { should_not
|
34
|
+
let(:stderr) { "No such file or directory\r\n" }
|
35
|
+
it { should_not return_stderr('file') }
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
describe 'regexp matching of stderr' do
|
40
40
|
context command('cat /etc/resolv.conf') do
|
41
|
-
let(:
|
41
|
+
let(:stderr) { "No such file or directory\r\n" }
|
42
42
|
it { should return_stderr(/file/) }
|
43
43
|
end
|
44
44
|
end
|
@@ -63,7 +63,5 @@ EOF
|
|
63
63
|
}
|
64
64
|
|
65
65
|
its(:stdout) { should match /bin/ }
|
66
|
-
its(:stderr) { should match /bin/ }
|
67
|
-
|
68
66
|
its(:stdout) { should eq stdout }
|
69
67
|
end
|
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
@@ -23,21 +23,21 @@ describe 'regexp matching of stdout' do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe command('cat /etc/resolv.conf') do
|
26
|
-
let(:
|
26
|
+
let(:stderr) { "No such file or directory\r\n" }
|
27
27
|
it { should return_stderr("No such file or directory") }
|
28
28
|
its(:command) { should eq 'cat /etc/resolv.conf' }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe 'complete matching of stderr' do
|
32
32
|
context command('cat /etc/resolv.conf') do
|
33
|
-
let(:
|
34
|
-
it { should_not
|
33
|
+
let(:stderr) { "No such file or directory\r\n" }
|
34
|
+
it { should_not return_stderr('file') }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
38
|
describe 'regexp matching of stderr' do
|
39
39
|
context command('cat /etc/resolv.conf') do
|
40
|
-
let(:
|
40
|
+
let(:stderr) { "No such file or directory\r\n" }
|
41
41
|
it { should return_stderr(/file/) }
|
42
42
|
end
|
43
43
|
end
|
@@ -61,7 +61,5 @@ EOF
|
|
61
61
|
}
|
62
62
|
|
63
63
|
its(:stdout) { should match /bin/ }
|
64
|
-
its(:stderr) { should match /bin/ }
|
65
|
-
|
66
64
|
its(:stdout) { should eq stdout }
|
67
65
|
end
|
@@ -24,21 +24,21 @@ describe 'regexp matching of stdout' do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
describe command('test_cmd /test/path/file') do
|
27
|
-
let(:
|
27
|
+
let(:stderr) { "No such file or directory\r\n" }
|
28
28
|
it { should return_stderr("No such file or directory") }
|
29
29
|
its(:command) { should eq 'test_cmd /test/path/file' }
|
30
30
|
end
|
31
31
|
|
32
32
|
describe 'complete matching of stderr' do
|
33
33
|
context command('test_cmd /test/path/file') do
|
34
|
-
let(:
|
35
|
-
it { should_not
|
34
|
+
let(:stderr) { "No such file or directory\r\n" }
|
35
|
+
it { should_not return_stderr('file') }
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
describe 'regexp matching of stderr' do
|
40
40
|
context command('test_cmd /test/path/file') do
|
41
|
-
let(:
|
41
|
+
let(:stderr) { "No such file or directory\r\n" }
|
42
42
|
it { should return_stderr(/file/) }
|
43
43
|
end
|
44
44
|
end
|
@@ -63,7 +63,5 @@ EOF
|
|
63
63
|
}
|
64
64
|
|
65
65
|
its(:stdout) { should match /Program Files/ }
|
66
|
-
its(:stderr) { should match /Program Files/ }
|
67
|
-
|
68
66
|
its(:stdout) { should eq stdout }
|
69
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|