serverspec 2.0.0.beta19 → 2.0.0.beta20
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/WINDOWS_SUPPORT.md +9 -13
- data/lib/serverspec/helper/type.rb +7 -9
- data/lib/serverspec/helper.rb +0 -2
- data/lib/serverspec/setup.rb +11 -7
- data/lib/serverspec/type/base.rb +15 -17
- data/lib/serverspec/type/cgroup.rb +13 -16
- data/lib/serverspec/type/command.rb +14 -17
- data/lib/serverspec/type/cron.rb +8 -9
- data/lib/serverspec/type/default_gateway.rb +14 -16
- data/lib/serverspec/type/file.rb +76 -78
- data/lib/serverspec/type/group.rb +7 -9
- data/lib/serverspec/type/host.rb +10 -12
- data/lib/serverspec/type/iis_app_pool.rb +40 -42
- data/lib/serverspec/type/iis_website.rb +28 -31
- data/lib/serverspec/type/interface.rb +10 -12
- data/lib/serverspec/type/ipfilter.rb +7 -9
- data/lib/serverspec/type/ipnat.rb +7 -9
- data/lib/serverspec/type/iptables.rb +7 -9
- data/lib/serverspec/type/kernel_module.rb +4 -6
- data/lib/serverspec/type/linux_kernel_parameter.rb +7 -9
- data/lib/serverspec/type/lxc.rb +10 -12
- data/lib/serverspec/type/mail_alias.rb +4 -6
- data/lib/serverspec/type/package.rb +48 -50
- data/lib/serverspec/type/php_config.rb +7 -9
- data/lib/serverspec/type/port.rb +28 -30
- data/lib/serverspec/type/ppa.rb +7 -9
- data/lib/serverspec/type/process.rb +20 -22
- data/lib/serverspec/type/routing_table.rb +7 -9
- data/lib/serverspec/type/selinux.rb +13 -17
- data/lib/serverspec/type/service.rb +24 -26
- data/lib/serverspec/type/user.rb +22 -30
- data/lib/serverspec/type/windows_feature.rb +4 -6
- data/lib/serverspec/type/windows_hot_fix.rb +4 -6
- data/lib/serverspec/type/windows_registry_key.rb +13 -15
- data/lib/serverspec/type/windows_scheduled_task.rb +4 -6
- data/lib/serverspec/type/yumrepo.rb +7 -9
- data/lib/serverspec/type/zfs.rb +10 -12
- data/lib/serverspec/version.rb +1 -1
- data/lib/serverspec.rb +2 -1
- data/spec/spec_helper.rb +2 -3
- data/spec/type/aix/group_spec.rb +0 -4
- data/spec/type/aix/package_spec.rb +0 -4
- data/spec/type/aix/port_spec.rb +12 -25
- data/spec/type/aix/service_spec.rb +0 -7
- data/spec/type/aix/user_spec.rb +0 -12
- data/spec/type/arch/file_spec.rb +0 -13
- data/spec/type/arch/package_spec.rb +0 -10
- data/spec/type/base/cron_spec.rb +0 -8
- data/spec/type/base/file_spec.rb +0 -53
- data/spec/type/base/group_spec.rb +0 -8
- data/spec/type/base/host_spec.rb +0 -20
- data/spec/type/base/mail_alias_spec.rb +0 -4
- data/spec/type/base/package_spec.rb +10 -38
- data/spec/type/base/port_spec.rb +19 -18
- data/spec/type/base/service_spec.rb +4 -29
- data/spec/type/base/user_spec.rb +0 -24
- data/spec/type/darwin/package_spec.rb +0 -8
- data/spec/type/darwin/port_spec.rb +17 -23
- data/spec/type/darwin/service_spec.rb +0 -12
- data/spec/type/debian/package_spec.rb +0 -12
- data/spec/type/debian/service_spec.rb +0 -8
- data/spec/type/freebsd/file_spec.rb +0 -16
- data/spec/type/freebsd/package_spec.rb +0 -8
- data/spec/type/freebsd/port_spec.rb +17 -23
- data/spec/type/freebsd/service_spec.rb +0 -4
- data/spec/type/freebsd10/package_spec.rb +0 -8
- data/spec/type/gentoo/package_spec.rb +0 -5
- data/spec/type/gentoo/service_spec.rb +0 -8
- data/spec/type/linux/file_spec.rb +0 -13
- data/spec/type/linux/iptables_spec.rb +0 -8
- data/spec/type/linux/kernel_module_spec.rb +0 -4
- data/spec/type/linux/lxc_container_spec.rb +0 -8
- data/spec/type/nixos/package_spec.rb +0 -12
- data/spec/type/openbsd/file_spec.rb +0 -30
- data/spec/type/openbsd/mail_alias_spec.rb +0 -4
- data/spec/type/openbsd/package_spec.rb +0 -9
- data/spec/type/openbsd/service_spec.rb +0 -7
- data/spec/type/openbsd/user_spec.rb +0 -8
- data/spec/type/opensuse/service_spec.rb +0 -12
- data/spec/type/plamo/package_spec.rb +0 -4
- data/spec/type/plamo/service_spec.rb +0 -4
- data/spec/type/redhat/file_spec.rb +0 -13
- data/spec/type/redhat/package_spec.rb +0 -12
- data/spec/type/redhat/service_spec.rb +0 -8
- data/spec/type/redhat/yumrepo_spec.rb +5 -19
- data/spec/type/redhat5/iptables_spec.rb +0 -8
- data/spec/type/smartos/package_spec.rb +0 -8
- data/spec/type/smartos/service_spec.rb +0 -12
- data/spec/type/solaris/cron_spec.rb +0 -8
- data/spec/type/solaris/file_spec.rb +0 -14
- data/spec/type/solaris/group_spec.rb +0 -4
- data/spec/type/solaris/host_spec.rb +3 -11
- data/spec/type/solaris/package_spec.rb +0 -4
- data/spec/type/solaris/port_spec.rb +23 -22
- data/spec/type/solaris/service_spec.rb +0 -12
- data/spec/type/solaris/user_spec.rb +0 -12
- data/spec/type/solaris10/file_spec.rb +0 -58
- data/spec/type/solaris10/group_spec.rb +0 -4
- data/spec/type/solaris10/host_spec.rb +2 -6
- data/spec/type/solaris10/package_spec.rb +0 -3
- data/spec/type/solaris10/user_spec.rb +0 -4
- data/spec/type/suse/package_spec.rb +0 -12
- data/spec/type/suse/service_spec.rb +0 -8
- data/spec/type/ubuntu/ppa_spec.rb +0 -8
- data/spec/type/ubuntu/service_spec.rb +0 -4
- data/spec/type/windows/feature_spec.rb +8 -0
- data/spec/type/windows/file_spec.rb +0 -36
- data/spec/type/windows/group_spec.rb +0 -4
- data/spec/type/windows/host_spec.rb +0 -20
- data/spec/type/windows/port_spec.rb +0 -4
- data/spec/type/windows/service_spec.rb +0 -8
- data/spec/type/windows/user_spec.rb +0 -8
- metadata +2 -5
- data/lib/serverspec/helper/properties.rb +0 -9
- data/spec/helper/properties_spec.rb +0 -11
|
@@ -8,18 +8,10 @@ describe file('/some/valid/file') do
|
|
|
8
8
|
it { should be_file }
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
describe file('/some/invalid/file') do
|
|
12
|
-
it { should_not be_file }
|
|
13
|
-
end
|
|
14
|
-
|
|
15
11
|
describe file('/some/valid/folder') do
|
|
16
12
|
it { should be_directory }
|
|
17
13
|
end
|
|
18
14
|
|
|
19
|
-
describe file('/some/invalid/folder') do
|
|
20
|
-
it { should_not be_directory }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
15
|
describe file('/some/file') do
|
|
24
16
|
it { should contain 'search text' }
|
|
25
17
|
end
|
|
@@ -28,42 +20,22 @@ describe file('/some/file') do
|
|
|
28
20
|
it { should contain /^search text/ }
|
|
29
21
|
end
|
|
30
22
|
|
|
31
|
-
describe file('/some/file') do
|
|
32
|
-
it { should_not contain 'This is invalid text!!' }
|
|
33
|
-
end
|
|
34
|
-
|
|
35
23
|
describe file('Gemfile') do
|
|
36
24
|
it { should contain('rspec').from(/^group :test do/).to(/^end/) }
|
|
37
25
|
end
|
|
38
26
|
|
|
39
|
-
describe file('/some/file') do
|
|
40
|
-
it { should_not contain('This is invalid text!!').from(/^group :test do/).to(/^end/) }
|
|
41
|
-
end
|
|
42
|
-
|
|
43
27
|
describe file('Gemfile') do
|
|
44
28
|
it { should contain('rspec').after(/^group :test do/) }
|
|
45
29
|
end
|
|
46
30
|
|
|
47
|
-
describe file('Gemfile') do
|
|
48
|
-
it { should_not contain('This is invalid text!!').after(/^group :test do/) }
|
|
49
|
-
end
|
|
50
|
-
|
|
51
31
|
describe file('Gemfile') do
|
|
52
32
|
it { should contain('rspec').before(/end/) }
|
|
53
33
|
end
|
|
54
34
|
|
|
55
|
-
describe file('Gemfile') do
|
|
56
|
-
it { should_not contain('This is invalid text!!').before(/^end/) }
|
|
57
|
-
end
|
|
58
|
-
|
|
59
35
|
describe file('/some/file') do
|
|
60
36
|
it { should be_readable }
|
|
61
37
|
end
|
|
62
38
|
|
|
63
|
-
describe file('/some/invalid/file') do
|
|
64
|
-
it { should_not be_readable }
|
|
65
|
-
end
|
|
66
|
-
|
|
67
39
|
describe file('/some/file') do
|
|
68
40
|
it "should raise error if trying to check access by 'owner' or 'group' or 'others'" do
|
|
69
41
|
['owner', 'group', 'others'].each do |access|
|
|
@@ -84,10 +56,6 @@ describe file('/some/file') do
|
|
|
84
56
|
it { should be_writable }
|
|
85
57
|
end
|
|
86
58
|
|
|
87
|
-
describe file('/some/invalid/file') do
|
|
88
|
-
it { should_not be_writable }
|
|
89
|
-
end
|
|
90
|
-
|
|
91
59
|
describe file('/some/file') do
|
|
92
60
|
it "should raise error if trying to check access by 'owner' or 'group' or 'others'" do
|
|
93
61
|
['owner', 'group', 'others'].each do |access|
|
|
@@ -108,10 +76,6 @@ describe file('/some/file') do
|
|
|
108
76
|
it { should be_executable }
|
|
109
77
|
end
|
|
110
78
|
|
|
111
|
-
describe file('/some/invalid/file') do
|
|
112
|
-
it { should_not be_executable }
|
|
113
|
-
end
|
|
114
|
-
|
|
115
79
|
describe file('/some/file') do
|
|
116
80
|
it "should raise error if trying to check access by 'owner' or 'group' or 'others'" do
|
|
117
81
|
['owner', 'group', 'others'].each do |access|
|
|
@@ -7,34 +7,18 @@ describe host('127.0.0.1') do
|
|
|
7
7
|
it { should be_resolvable }
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
describe host('invalid-name') do
|
|
11
|
-
it { should_not be_resolvable }
|
|
12
|
-
end
|
|
13
|
-
|
|
14
10
|
describe host('127.0.0.1') do
|
|
15
11
|
it { should be_resolvable.by('hosts') }
|
|
16
12
|
end
|
|
17
13
|
|
|
18
|
-
describe host('invalid-name') do
|
|
19
|
-
it { should_not be_resolvable.by('hosts') }
|
|
20
|
-
end
|
|
21
|
-
|
|
22
14
|
describe host('127.0.0.1') do
|
|
23
15
|
it { should be_resolvable.by('dns') }
|
|
24
16
|
end
|
|
25
17
|
|
|
26
|
-
describe host('invalid-name') do
|
|
27
|
-
it { should_not be_resolvable.by('dns') }
|
|
28
|
-
end
|
|
29
|
-
|
|
30
18
|
describe host('127.0.0.1') do
|
|
31
19
|
it { should be_reachable }
|
|
32
20
|
end
|
|
33
21
|
|
|
34
|
-
describe host('invalid-host') do
|
|
35
|
-
it { should_not be_reachable }
|
|
36
|
-
end
|
|
37
|
-
|
|
38
22
|
describe host('127.0.0.1') do
|
|
39
23
|
it { should be_reachable.with(:proto => "icmp", :timeout=> 1) }
|
|
40
24
|
end
|
|
@@ -46,7 +30,3 @@ end
|
|
|
46
30
|
describe host('127.0.0.1') do
|
|
47
31
|
it { should be_reachable.with(:proto => "udp", :port => 53, :timeout=> 1) }
|
|
48
32
|
end
|
|
49
|
-
|
|
50
|
-
describe host('invalid-host') do
|
|
51
|
-
it { should_not be_reachable.with(:proto => "udp", :port => 53, :timeout=> 1) }
|
|
52
|
-
end
|
|
@@ -8,18 +8,10 @@ describe service('Test Service') do
|
|
|
8
8
|
it { should be_enabled }
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
describe service('invalid-service') do
|
|
12
|
-
it { should_not be_enabled }
|
|
13
|
-
end
|
|
14
|
-
|
|
15
11
|
describe service('Test Service') do
|
|
16
12
|
it { should be_running }
|
|
17
13
|
end
|
|
18
14
|
|
|
19
|
-
describe service('invalid-daemon') do
|
|
20
|
-
it { should_not be_running }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
15
|
describe service('service') do
|
|
24
16
|
it { should be_installed }
|
|
25
17
|
end
|
|
@@ -12,10 +12,6 @@ describe user('test.domain\test.user') do
|
|
|
12
12
|
it { should exist }
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
describe user('invalid-user') do
|
|
16
|
-
it { should_not exist }
|
|
17
|
-
end
|
|
18
|
-
|
|
19
15
|
describe user('test.user') do
|
|
20
16
|
it { should belong_to_group 'test.group' }
|
|
21
17
|
end
|
|
@@ -24,10 +20,6 @@ describe user('test.user.domain\test.user') do
|
|
|
24
20
|
it { should belong_to_group 'test.group.domain\test.group' }
|
|
25
21
|
end
|
|
26
22
|
|
|
27
|
-
describe user('test.user') do
|
|
28
|
-
it { should_not belong_to_group 'invalid-group' }
|
|
29
|
-
end
|
|
30
|
-
|
|
31
23
|
describe user('test.user') do
|
|
32
24
|
it "should raise error if command is not supported" do
|
|
33
25
|
{
|
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.0.0.
|
|
4
|
+
version: 2.0.0.beta20
|
|
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-08-
|
|
11
|
+
date: 2014-08-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -101,7 +101,6 @@ files:
|
|
|
101
101
|
- lib/serverspec.rb
|
|
102
102
|
- lib/serverspec/commands/base.rb
|
|
103
103
|
- lib/serverspec/helper.rb
|
|
104
|
-
- lib/serverspec/helper/properties.rb
|
|
105
104
|
- lib/serverspec/helper/type.rb
|
|
106
105
|
- lib/serverspec/matcher.rb
|
|
107
106
|
- lib/serverspec/matcher/be_enabled.rb
|
|
@@ -159,7 +158,6 @@ files:
|
|
|
159
158
|
- lib/serverspec/type/zfs.rb
|
|
160
159
|
- lib/serverspec/version.rb
|
|
161
160
|
- serverspec.gemspec
|
|
162
|
-
- spec/helper/properties_spec.rb
|
|
163
161
|
- spec/helper/type_spec.rb
|
|
164
162
|
- spec/spec_helper.rb
|
|
165
163
|
- spec/type/aix/file_spec.rb
|
|
@@ -290,7 +288,6 @@ signing_key:
|
|
|
290
288
|
specification_version: 4
|
|
291
289
|
summary: RSpec tests for your servers configured by Puppet, Chef or anything else
|
|
292
290
|
test_files:
|
|
293
|
-
- spec/helper/properties_spec.rb
|
|
294
291
|
- spec/helper/type_spec.rb
|
|
295
292
|
- spec/spec_helper.rb
|
|
296
293
|
- spec/type/aix/file_spec.rb
|