serverspec 2.0.0.beta19 → 2.0.0.beta20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/WINDOWS_SUPPORT.md +9 -13
  3. data/lib/serverspec/helper/type.rb +7 -9
  4. data/lib/serverspec/helper.rb +0 -2
  5. data/lib/serverspec/setup.rb +11 -7
  6. data/lib/serverspec/type/base.rb +15 -17
  7. data/lib/serverspec/type/cgroup.rb +13 -16
  8. data/lib/serverspec/type/command.rb +14 -17
  9. data/lib/serverspec/type/cron.rb +8 -9
  10. data/lib/serverspec/type/default_gateway.rb +14 -16
  11. data/lib/serverspec/type/file.rb +76 -78
  12. data/lib/serverspec/type/group.rb +7 -9
  13. data/lib/serverspec/type/host.rb +10 -12
  14. data/lib/serverspec/type/iis_app_pool.rb +40 -42
  15. data/lib/serverspec/type/iis_website.rb +28 -31
  16. data/lib/serverspec/type/interface.rb +10 -12
  17. data/lib/serverspec/type/ipfilter.rb +7 -9
  18. data/lib/serverspec/type/ipnat.rb +7 -9
  19. data/lib/serverspec/type/iptables.rb +7 -9
  20. data/lib/serverspec/type/kernel_module.rb +4 -6
  21. data/lib/serverspec/type/linux_kernel_parameter.rb +7 -9
  22. data/lib/serverspec/type/lxc.rb +10 -12
  23. data/lib/serverspec/type/mail_alias.rb +4 -6
  24. data/lib/serverspec/type/package.rb +48 -50
  25. data/lib/serverspec/type/php_config.rb +7 -9
  26. data/lib/serverspec/type/port.rb +28 -30
  27. data/lib/serverspec/type/ppa.rb +7 -9
  28. data/lib/serverspec/type/process.rb +20 -22
  29. data/lib/serverspec/type/routing_table.rb +7 -9
  30. data/lib/serverspec/type/selinux.rb +13 -17
  31. data/lib/serverspec/type/service.rb +24 -26
  32. data/lib/serverspec/type/user.rb +22 -30
  33. data/lib/serverspec/type/windows_feature.rb +4 -6
  34. data/lib/serverspec/type/windows_hot_fix.rb +4 -6
  35. data/lib/serverspec/type/windows_registry_key.rb +13 -15
  36. data/lib/serverspec/type/windows_scheduled_task.rb +4 -6
  37. data/lib/serverspec/type/yumrepo.rb +7 -9
  38. data/lib/serverspec/type/zfs.rb +10 -12
  39. data/lib/serverspec/version.rb +1 -1
  40. data/lib/serverspec.rb +2 -1
  41. data/spec/spec_helper.rb +2 -3
  42. data/spec/type/aix/group_spec.rb +0 -4
  43. data/spec/type/aix/package_spec.rb +0 -4
  44. data/spec/type/aix/port_spec.rb +12 -25
  45. data/spec/type/aix/service_spec.rb +0 -7
  46. data/spec/type/aix/user_spec.rb +0 -12
  47. data/spec/type/arch/file_spec.rb +0 -13
  48. data/spec/type/arch/package_spec.rb +0 -10
  49. data/spec/type/base/cron_spec.rb +0 -8
  50. data/spec/type/base/file_spec.rb +0 -53
  51. data/spec/type/base/group_spec.rb +0 -8
  52. data/spec/type/base/host_spec.rb +0 -20
  53. data/spec/type/base/mail_alias_spec.rb +0 -4
  54. data/spec/type/base/package_spec.rb +10 -38
  55. data/spec/type/base/port_spec.rb +19 -18
  56. data/spec/type/base/service_spec.rb +4 -29
  57. data/spec/type/base/user_spec.rb +0 -24
  58. data/spec/type/darwin/package_spec.rb +0 -8
  59. data/spec/type/darwin/port_spec.rb +17 -23
  60. data/spec/type/darwin/service_spec.rb +0 -12
  61. data/spec/type/debian/package_spec.rb +0 -12
  62. data/spec/type/debian/service_spec.rb +0 -8
  63. data/spec/type/freebsd/file_spec.rb +0 -16
  64. data/spec/type/freebsd/package_spec.rb +0 -8
  65. data/spec/type/freebsd/port_spec.rb +17 -23
  66. data/spec/type/freebsd/service_spec.rb +0 -4
  67. data/spec/type/freebsd10/package_spec.rb +0 -8
  68. data/spec/type/gentoo/package_spec.rb +0 -5
  69. data/spec/type/gentoo/service_spec.rb +0 -8
  70. data/spec/type/linux/file_spec.rb +0 -13
  71. data/spec/type/linux/iptables_spec.rb +0 -8
  72. data/spec/type/linux/kernel_module_spec.rb +0 -4
  73. data/spec/type/linux/lxc_container_spec.rb +0 -8
  74. data/spec/type/nixos/package_spec.rb +0 -12
  75. data/spec/type/openbsd/file_spec.rb +0 -30
  76. data/spec/type/openbsd/mail_alias_spec.rb +0 -4
  77. data/spec/type/openbsd/package_spec.rb +0 -9
  78. data/spec/type/openbsd/service_spec.rb +0 -7
  79. data/spec/type/openbsd/user_spec.rb +0 -8
  80. data/spec/type/opensuse/service_spec.rb +0 -12
  81. data/spec/type/plamo/package_spec.rb +0 -4
  82. data/spec/type/plamo/service_spec.rb +0 -4
  83. data/spec/type/redhat/file_spec.rb +0 -13
  84. data/spec/type/redhat/package_spec.rb +0 -12
  85. data/spec/type/redhat/service_spec.rb +0 -8
  86. data/spec/type/redhat/yumrepo_spec.rb +5 -19
  87. data/spec/type/redhat5/iptables_spec.rb +0 -8
  88. data/spec/type/smartos/package_spec.rb +0 -8
  89. data/spec/type/smartos/service_spec.rb +0 -12
  90. data/spec/type/solaris/cron_spec.rb +0 -8
  91. data/spec/type/solaris/file_spec.rb +0 -14
  92. data/spec/type/solaris/group_spec.rb +0 -4
  93. data/spec/type/solaris/host_spec.rb +3 -11
  94. data/spec/type/solaris/package_spec.rb +0 -4
  95. data/spec/type/solaris/port_spec.rb +23 -22
  96. data/spec/type/solaris/service_spec.rb +0 -12
  97. data/spec/type/solaris/user_spec.rb +0 -12
  98. data/spec/type/solaris10/file_spec.rb +0 -58
  99. data/spec/type/solaris10/group_spec.rb +0 -4
  100. data/spec/type/solaris10/host_spec.rb +2 -6
  101. data/spec/type/solaris10/package_spec.rb +0 -3
  102. data/spec/type/solaris10/user_spec.rb +0 -4
  103. data/spec/type/suse/package_spec.rb +0 -12
  104. data/spec/type/suse/service_spec.rb +0 -8
  105. data/spec/type/ubuntu/ppa_spec.rb +0 -8
  106. data/spec/type/ubuntu/service_spec.rb +0 -4
  107. data/spec/type/windows/feature_spec.rb +8 -0
  108. data/spec/type/windows/file_spec.rb +0 -36
  109. data/spec/type/windows/group_spec.rb +0 -4
  110. data/spec/type/windows/host_spec.rb +0 -20
  111. data/spec/type/windows/port_spec.rb +0 -4
  112. data/spec/type/windows/service_spec.rb +0 -8
  113. data/spec/type/windows/user_spec.rb +0 -8
  114. metadata +2 -5
  115. data/lib/serverspec/helper/properties.rb +0 -9
  116. 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|
@@ -12,10 +12,6 @@ describe group('test.domain\test.group') do
12
12
  it { should exist }
13
13
  end
14
14
 
15
- describe group('invalid-group') do
16
- it { should_not exist }
17
- end
18
-
19
15
  describe group('test.group') do
20
16
  it "should raise error if command is not supported" do
21
17
  {
@@ -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,10 +8,6 @@ describe port(80) do
8
8
  it { should be_listening }
9
9
  end
10
10
 
11
- describe port('invalid') do
12
- it { should_not be_listening }
13
- end
14
-
15
11
  describe port(80) do
16
12
  it { should be_listening.with("tcp") }
17
13
  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.beta19
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-10 00:00:00.000000000 Z
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
@@ -1,9 +0,0 @@
1
- require 'specinfra/properties'
2
-
3
- module Serverspec
4
- module Helper
5
- module Properties
6
- include Specinfra::Helper::Properties
7
- end
8
- end
9
- end
@@ -1,11 +0,0 @@
1
- require 'spec_helper'
2
-
3
- include Serverspec::Helper::Properties
4
-
5
- describe 'Properties Helper' do
6
- before :all do
7
- set_property :role => 'proxy'
8
- end
9
- subject { property }
10
- it { should include :role => 'proxy' }
11
- end