serverspec 0.10.3 → 0.10.4
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/backend/powershell/support/find_service.ps1 +1 -1
- data/lib/serverspec/version.rb +1 -1
- data/spec/backend/cmd/configuration_spec.rb +4 -0
- data/spec/backend/winrm/configuration_spec.rb +4 -0
- data/spec/spec_helper.rb +4 -11
- data/spec/windows/file_spec.rb +3 -0
- data/spec/windows/group_spec.rb +3 -0
- data/spec/windows/port_spec.rb +3 -0
- data/spec/windows/service_spec.rb +24 -0
- data/spec/windows/user_spec.rb +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e129075cf8dab2aa89c0d5b0c2995a301c3e032
|
4
|
+
data.tar.gz: 410f4266d33bcbb3ac5df1c2ad2162cb5f9c8954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b62a181c674d1cdb217fb48af4749f1e8bba0c90aefcd21c6639d2a92b9f7ab64574f1dd5fd405ec7b646ffeb2ec21788b55e748e1d3721b69c8e4157b6c4bda
|
7
|
+
data.tar.gz: 5c631ed3134c89c3617c96d765c53849ab5d006d5c682a395f82c8b0d708e819b1d7f5df69896b07aac598c4e493205d78d9e25cde1c86d56866f3e5c030d5f0
|
data/lib/serverspec/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -35,26 +35,19 @@ module Serverspec
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
-
[Exec, Ssh].each do |clz|
|
38
|
+
[Exec, Ssh, Cmd, WinRM].each do |clz|
|
39
39
|
clz.class_eval do
|
40
40
|
include TestCommandRunner
|
41
41
|
def run_command(cmd)
|
42
|
+
if RSpec.configuration.os =~ /Windows/
|
43
|
+
cmd = cmd.script
|
44
|
+
end
|
42
45
|
cmd = build_command(cmd)
|
43
46
|
cmd = add_pre_command(cmd)
|
44
47
|
do_run cmd
|
45
48
|
end
|
46
49
|
end
|
47
50
|
end
|
48
|
-
[Cmd, WinRM].each do |clz|
|
49
|
-
clz.class_eval do
|
50
|
-
include TestCommandRunner
|
51
|
-
def run_command(cmd)
|
52
|
-
cmd = build_command(cmd.script)
|
53
|
-
cmd = add_pre_command(cmd)
|
54
|
-
do_run cmd
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
51
|
end
|
59
52
|
|
60
53
|
module Type
|
data/spec/windows/file_spec.rb
CHANGED
data/spec/windows/group_spec.rb
CHANGED
data/spec/windows/port_spec.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
include Serverspec::Helper::Cmd
|
4
|
+
RSpec.configure do |c|
|
5
|
+
c.os = 'Windows'
|
6
|
+
end
|
7
|
+
|
8
|
+
describe service('Test Service') do
|
9
|
+
it { should be_enabled }
|
10
|
+
its(:command) { should eq "(FindService -name 'Test Service').StartMode -eq 'Auto'" }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe service('invalid-service') do
|
14
|
+
it { should_not be_enabled }
|
15
|
+
end
|
16
|
+
|
17
|
+
describe service('Test Service') do
|
18
|
+
it { should be_running }
|
19
|
+
its(:command) { should eq "(FindService -name 'Test Service').State -eq 'Running'" }
|
20
|
+
end
|
21
|
+
|
22
|
+
describe service('invalid-daemon') do
|
23
|
+
it { should_not be_running }
|
24
|
+
end
|
data/spec/windows/user_spec.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -369,6 +369,7 @@ files:
|
|
369
369
|
- spec/windows/file_spec.rb
|
370
370
|
- spec/windows/group_spec.rb
|
371
371
|
- spec/windows/port_spec.rb
|
372
|
+
- spec/windows/service_spec.rb
|
372
373
|
- spec/windows/user_spec.rb
|
373
374
|
homepage: http://serverspec.org/
|
374
375
|
licenses:
|
@@ -563,4 +564,5 @@ test_files:
|
|
563
564
|
- spec/windows/file_spec.rb
|
564
565
|
- spec/windows/group_spec.rb
|
565
566
|
- spec/windows/port_spec.rb
|
567
|
+
- spec/windows/service_spec.rb
|
566
568
|
- spec/windows/user_spec.rb
|