serverspec 2.36.0 → 2.36.1
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/.gitignore +2 -0
- data/README.md +10 -0
- data/Rakefile +1 -0
- data/lib/serverspec/type/json_file.rb +2 -2
- data/lib/serverspec/version.rb +1 -1
- data/spec/type/aix/file_spec.rb +1 -5
- data/spec/type/base/file_spec.rb +1 -1
- data/spec/type/base/service_spec.rb +2 -2
- data/spec/type/linux/docker_container_spec.rb +2 -2
- data/spec/type/solaris10/file_spec.rb +1 -1
- data/spec/type/windows/file_spec.rb +13 -6
- data/spec/type/windows/group_spec.rb +1 -1
- data/spec/type/windows/service_spec.rb +2 -2
- data/spec/type/windows/user_spec.rb +1 -1
- 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: a293a1d69fe4accf6d9e711d2cf87eea5fd71884
|
4
|
+
data.tar.gz: 63abf7e1a41a7cb12aed1979c322bd0d1458e44f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 561a5a3a9761cd871fcee288043dfb35407189becaeb555397d55a6e159b4db1c1cde655f7f0a4440c3af75429897c1e253f16cdfd6e18593bbb71de2a24c3c6
|
7
|
+
data.tar.gz: 9e458574b493b93a411dbcac6662e9899744abf749e2c20f032a50e83bcd9acb4c64cb0f76c5bc00f28016f44e47d9abb7fb7837becabbee43aa65ae57bfb63d
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -6,6 +6,16 @@ You can see the details of serverspec on [serverspec.org](http://serverspec.org/
|
|
6
6
|
|
7
7
|
----
|
8
8
|
|
9
|
+
## Running the gem's tests
|
10
|
+
|
11
|
+
Use
|
12
|
+
|
13
|
+
```bundle exec rake```
|
14
|
+
|
15
|
+
(Using ```rspec``` alone will not work).
|
16
|
+
|
17
|
+
|
18
|
+
|
9
19
|
## Maintenance policy of Serverspec/Specinfra
|
10
20
|
|
11
21
|
* The person who found a bug should fix the bug by themself.
|
data/Rakefile
CHANGED
data/lib/serverspec/version.rb
CHANGED
data/spec/type/aix/file_spec.rb
CHANGED
data/spec/type/base/file_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe service('sshd') do
|
|
27
27
|
it {
|
28
28
|
expect {
|
29
29
|
should be_running.under('not implemented')
|
30
|
-
}.to
|
30
|
+
}.to raise_error(/is not implemented in Specinfra/)
|
31
31
|
}
|
32
32
|
end
|
33
33
|
|
@@ -49,6 +49,6 @@ describe service('sshd') do
|
|
49
49
|
it {
|
50
50
|
expect {
|
51
51
|
should be_monitored_by('not implemented')
|
52
|
-
}.to
|
52
|
+
}.to raise_error(NotImplementedError)
|
53
53
|
}
|
54
54
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
require 'spec_helper'
|
3
|
-
require '
|
3
|
+
require 'multi_json'
|
4
4
|
|
5
5
|
property[:os] = nil
|
6
6
|
set :os, {:family => 'linux'}
|
@@ -21,7 +21,7 @@ end
|
|
21
21
|
|
22
22
|
describe docker_container('restarting') do
|
23
23
|
let(:stdout) do
|
24
|
-
attrs =
|
24
|
+
attrs = MultiJson.load(inspect_container)
|
25
25
|
attrs.first['State']['Restarting'] = true
|
26
26
|
attrs.to_json
|
27
27
|
end
|
@@ -39,7 +39,7 @@ end
|
|
39
39
|
describe file('/some/file') do
|
40
40
|
it "should raise error if trying to check access by 'owner' or 'group' or 'others'" do
|
41
41
|
['owner', 'group', 'others'].each do |access|
|
42
|
-
expect { should be_readable.by(access) }.to raise_error
|
42
|
+
expect { should be_readable.by(access) }.to raise_error(RuntimeError)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
describe file('/some/file') do
|
60
60
|
it "should raise error if trying to check access by 'owner' or 'group' or 'others'" do
|
61
61
|
['owner', 'group', 'others'].each do |access|
|
62
|
-
expect { should be_writable.by(access) }.to raise_error
|
62
|
+
expect { should be_writable.by(access) }.to raise_error(RuntimeError)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
@@ -79,7 +79,7 @@ end
|
|
79
79
|
describe file('/some/file') do
|
80
80
|
it "should raise error if trying to check access by 'owner' or 'group' or 'others'" do
|
81
81
|
['owner', 'group', 'others'].each do |access|
|
82
|
-
expect { should be_executable.by(access) }.to raise_error
|
82
|
+
expect { should be_executable.by(access) }.to raise_error(RuntimeError)
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
@@ -97,17 +97,24 @@ describe file('/some/file') do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
describe file('/some/test/file') do
|
100
|
-
it "should raise error if command is not
|
100
|
+
it "should raise error if command is not implemented" do
|
101
101
|
{
|
102
102
|
:be_socket => [],
|
103
103
|
:be_mode => 644,
|
104
104
|
:be_grouped_into => 'root',
|
105
105
|
:be_linked_to => '/some/other/file',
|
106
|
-
:be_mounted => []
|
106
|
+
:be_mounted => []
|
107
|
+
}.each do |method, args|
|
108
|
+
expect { should self.send(method, *args) }.to raise_error(NotImplementedError)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should raise error if command is not defined" do
|
113
|
+
{
|
107
114
|
:match_md5checksum => '35435ea447c19f0ea5ef971837ab9ced',
|
108
115
|
:match_sha256checksum => '0c3feee1353a8459f8c7d84885e6bc602ef853751ffdbce3e3b6dfa1d345fc7a'
|
109
116
|
}.each do |method, args|
|
110
|
-
expect { should self.send(method, *args) }.to
|
117
|
+
expect { should self.send(method, *args) }.to raise_error(NoMethodError)
|
111
118
|
end
|
112
119
|
end
|
113
120
|
end
|
@@ -22,9 +22,9 @@ end
|
|
22
22
|
|
23
23
|
describe service('Test service') do
|
24
24
|
it "should raise error if trying to check service process controller" do
|
25
|
-
expect { should be_running.under('supervisor') }.to raise_error
|
25
|
+
expect { should be_running.under('supervisor') }.to raise_error(NotImplementedError)
|
26
26
|
end
|
27
27
|
it "should raise error if trying to check service monitoring" do
|
28
|
-
expect { should_not be_monitored_by('monit') }.to raise_error
|
28
|
+
expect { should_not be_monitored_by('monit') }.to raise_error(NotImplementedError)
|
29
29
|
end
|
30
30
|
end
|
@@ -27,7 +27,7 @@ describe user('test.user') do
|
|
27
27
|
:have_login_shell => [nil],
|
28
28
|
:have_authorized_key => [nil],
|
29
29
|
}.each do |method, args|
|
30
|
-
expect { should self.send(method, *args) }.to
|
30
|
+
expect { should self.send(method, *args) }.to raise_error(NotImplementedError)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
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: 2.36.
|
4
|
+
version: 2.36.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|