win32-service 0.7.0-x86-mswin32-60 → 0.7.1-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +247 -238
- data/MANIFEST +18 -18
- data/README +74 -45
- data/Rakefile +139 -128
- data/doc/daemon.txt +157 -157
- data/doc/service.txt +365 -368
- data/examples/demo_daemon.rb +89 -89
- data/examples/demo_daemon_ctl.rb +122 -122
- data/examples/demo_services.rb +23 -23
- data/ext/win32/daemon.c +611 -596
- data/lib/win32/daemon.so +0 -0
- data/lib/win32/service.rb +1638 -1607
- data/test/test_win32_daemon.rb +58 -58
- data/test/test_win32_service.rb +409 -251
- data/test/test_win32_service_configure.rb +97 -86
- data/test/test_win32_service_create.rb +131 -103
- data/test/test_win32_service_info.rb +184 -179
- data/test/test_win32_service_status.rb +113 -111
- data/win32-service.gemspec +41 -49
- metadata +6 -6
@@ -1,86 +1,97 @@
|
|
1
|
-
#######################################################################
|
2
|
-
# test_win32_service_configure.rb
|
3
|
-
#
|
4
|
-
# Test suite that validates the Service.configure method.
|
5
|
-
#######################################################################
|
6
|
-
require 'rubygems'
|
7
|
-
gem 'test-unit'
|
8
|
-
|
9
|
-
require 'win32/service'
|
10
|
-
require 'test/unit'
|
11
|
-
|
12
|
-
class
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
end
|
1
|
+
#######################################################################
|
2
|
+
# test_win32_service_configure.rb
|
3
|
+
#
|
4
|
+
# Test suite that validates the Service.configure method.
|
5
|
+
#######################################################################
|
6
|
+
require 'rubygems'
|
7
|
+
gem 'test-unit'
|
8
|
+
|
9
|
+
require 'win32/service'
|
10
|
+
require 'test/unit'
|
11
|
+
|
12
|
+
class TC_Win32_Service_Configure < Test::Unit::TestCase
|
13
|
+
def self.startup
|
14
|
+
@@service = "notepad_service"
|
15
|
+
@@command = "C:\\windows\\system32\\notepad.exe"
|
16
|
+
|
17
|
+
Win32::Service.new(
|
18
|
+
:service_name => @@service,
|
19
|
+
:binary_path_name => @@command
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def config_info
|
24
|
+
Win32::Service.config_info(@@service)
|
25
|
+
end
|
26
|
+
|
27
|
+
def full_info
|
28
|
+
service = nil
|
29
|
+
Win32::Service.services{ |s|
|
30
|
+
if s.service_name == @@service
|
31
|
+
service = s
|
32
|
+
break
|
33
|
+
end
|
34
|
+
}
|
35
|
+
service
|
36
|
+
end
|
37
|
+
|
38
|
+
def service_configure(opt)
|
39
|
+
options = {:service_name => @@service}
|
40
|
+
options = options.merge(opt)
|
41
|
+
assert_nothing_raised{ Win32::Service.configure(options) }
|
42
|
+
end
|
43
|
+
|
44
|
+
def setup
|
45
|
+
@info = Win32::Service.config_info(@@service)
|
46
|
+
end
|
47
|
+
|
48
|
+
test "configure method is defined" do
|
49
|
+
assert_respond_to(Win32::Service, :configure)
|
50
|
+
end
|
51
|
+
|
52
|
+
test "configuring the service type works as expected" do
|
53
|
+
assert_equal('own process, interactive', config_info.service_type)
|
54
|
+
service_configure(:service_type => Win32::Service::WIN32_SHARE_PROCESS)
|
55
|
+
assert_equal('share process', config_info.service_type)
|
56
|
+
end
|
57
|
+
|
58
|
+
test "configuring the description works as expected" do
|
59
|
+
assert_equal('', full_info.description)
|
60
|
+
service_configure(:description => 'test service')
|
61
|
+
assert_equal('test service', full_info.description)
|
62
|
+
end
|
63
|
+
|
64
|
+
test "configuring the start type works as expected" do
|
65
|
+
assert_equal('demand start', config_info.start_type)
|
66
|
+
service_configure(:start_type => Win32::Service::DISABLED)
|
67
|
+
assert_equal('disabled', config_info.start_type)
|
68
|
+
end
|
69
|
+
|
70
|
+
test "the configure method requires one argument" do
|
71
|
+
assert_raise(ArgumentError){ Win32::Service.configure }
|
72
|
+
end
|
73
|
+
|
74
|
+
test "the configure method requires a hash argument" do
|
75
|
+
assert_raise(ArgumentError){ Win32::Service.configure('bogus') }
|
76
|
+
end
|
77
|
+
|
78
|
+
test "the hash argument must not be empty" do
|
79
|
+
assert_raise(ArgumentError){ Win32::Service.configure({}) }
|
80
|
+
end
|
81
|
+
|
82
|
+
test "the service name must be provided or an error is raised" do
|
83
|
+
assert_raise(ArgumentError){
|
84
|
+
Win32::Service.configure(:binary_path_name => 'notepad.exe')
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
88
|
+
def teardown
|
89
|
+
@info = nil
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.shutdown
|
93
|
+
Win32::Service.delete(@@service) if Win32::Service.exists?(@@service)
|
94
|
+
@@service = nil
|
95
|
+
@@command = nil
|
96
|
+
end
|
97
|
+
end
|
@@ -1,103 +1,131 @@
|
|
1
|
-
########################################################################
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# Test case for the Service.create method. This test case will create
|
5
|
-
# a dummy (notepad) service. It won't actually run of course.
|
6
|
-
########################################################################
|
7
|
-
require 'rubygems'
|
8
|
-
gem 'test-unit'
|
9
|
-
|
10
|
-
require 'win32/service'
|
11
|
-
require 'test/unit'
|
12
|
-
|
13
|
-
class
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
1
|
+
########################################################################
|
2
|
+
# test_win32_service_create.rb
|
3
|
+
#
|
4
|
+
# Test case for the Service.create method. This test case will create
|
5
|
+
# a dummy (notepad) service. It won't actually run of course.
|
6
|
+
########################################################################
|
7
|
+
require 'rubygems'
|
8
|
+
gem 'test-unit'
|
9
|
+
|
10
|
+
require 'win32/service'
|
11
|
+
require 'test/unit'
|
12
|
+
|
13
|
+
class TC_Win32_Service_Create < Test::Unit::TestCase
|
14
|
+
def self.startup
|
15
|
+
@@service1 = "notepad_service1"
|
16
|
+
@@service2 = "notepad_service2"
|
17
|
+
@@command = "C:\\windows\\system32\\notepad.exe"
|
18
|
+
|
19
|
+
Win32::Service.new(
|
20
|
+
:service_name => @@service1,
|
21
|
+
:binary_path_name => @@command
|
22
|
+
)
|
23
|
+
|
24
|
+
Win32::Service.new(
|
25
|
+
:service_name => @@service2,
|
26
|
+
:display_name => 'Notepad Test',
|
27
|
+
:desired_access => Win32::Service::ALL_ACCESS,
|
28
|
+
:service_type => Win32::Service::WIN32_OWN_PROCESS,
|
29
|
+
:start_type => Win32::Service::DISABLED,
|
30
|
+
:error_control => Win32::Service::ERROR_IGNORE,
|
31
|
+
:binary_path_name => @@command,
|
32
|
+
:load_order_group => 'Network',
|
33
|
+
:dependencies => 'W32Time',
|
34
|
+
:description => 'Test service. Please delete me'
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
def setup
|
39
|
+
@info1 = Win32::Service.config_info(@@service1)
|
40
|
+
@info2 = Win32::Service.config_info(@@service2)
|
41
|
+
end
|
42
|
+
|
43
|
+
test "constructor basic functionality" do
|
44
|
+
assert_respond_to(Win32::Service, :new)
|
45
|
+
end
|
46
|
+
|
47
|
+
test "create is an alias for new" do
|
48
|
+
assert_respond_to(Win32::Service, :create)
|
49
|
+
assert_alias_method(Win32::Service, :create, :new)
|
50
|
+
end
|
51
|
+
|
52
|
+
test "ensure services were created in startup method" do
|
53
|
+
notify "If this test fails then remaining results are meaningless."
|
54
|
+
assert_true(Win32::Service.exists?(@@service1))
|
55
|
+
assert_true(Win32::Service.exists?(@@service2))
|
56
|
+
end
|
57
|
+
|
58
|
+
test "expected service type configuration information" do
|
59
|
+
assert_equal('own process, interactive', @info1.service_type)
|
60
|
+
end
|
61
|
+
|
62
|
+
test "expected start type configuration information" do
|
63
|
+
assert_equal('demand start', @info1.start_type)
|
64
|
+
end
|
65
|
+
|
66
|
+
test "expected error control configuration information" do
|
67
|
+
assert_equal('normal', @info1.error_control)
|
68
|
+
end
|
69
|
+
|
70
|
+
test "expected binary path name configuration information" do
|
71
|
+
assert_equal(@@command, @info1.binary_path_name)
|
72
|
+
end
|
73
|
+
|
74
|
+
test "expected load order group configuration information" do
|
75
|
+
assert_equal('', @info1.load_order_group)
|
76
|
+
end
|
77
|
+
|
78
|
+
test "expected tag id configuration information" do
|
79
|
+
assert_equal(0, @info1.tag_id)
|
80
|
+
end
|
81
|
+
|
82
|
+
test "expected dependency configuration information" do
|
83
|
+
assert_equal([], @info1.dependencies)
|
84
|
+
end
|
85
|
+
|
86
|
+
test "expected service start time configuration information" do
|
87
|
+
assert_equal('LocalSystem', @info1.service_start_name)
|
88
|
+
end
|
89
|
+
|
90
|
+
test "expected display name configuration information" do
|
91
|
+
assert_equal('notepad_service1', @info1.display_name)
|
92
|
+
end
|
93
|
+
|
94
|
+
test "configuration information options are set properly for service 2" do
|
95
|
+
assert_equal('own process', @info2.service_type)
|
96
|
+
assert_equal('disabled', @info2.start_type)
|
97
|
+
assert_equal('ignore', @info2.error_control)
|
98
|
+
assert_equal(@@command, @info2.binary_path_name)
|
99
|
+
assert_equal('Network', @info2.load_order_group)
|
100
|
+
assert_equal(0, @info2.tag_id)
|
101
|
+
assert_equal(['W32Time'], @info2.dependencies)
|
102
|
+
assert_equal('LocalSystem', @info2.service_start_name)
|
103
|
+
assert_equal('Notepad Test', @info2.display_name)
|
104
|
+
end
|
105
|
+
|
106
|
+
test "at least one argument is required or an error is raised" do
|
107
|
+
assert_raise(ArgumentError){ Win32::Service.new }
|
108
|
+
end
|
109
|
+
|
110
|
+
test "passing a bogus option to the constructor will cause an error" do
|
111
|
+
assert_raise(ArgumentError){ Win32::Service.new(:bogus => 'test.exe') }
|
112
|
+
end
|
113
|
+
|
114
|
+
test "the service name must be provided or an error is raised" do
|
115
|
+
assert_raise(ArgumentError){ Win32::Service.new(:binary_path_name => 'test.exe') }
|
116
|
+
end
|
117
|
+
|
118
|
+
def teardown
|
119
|
+
@info1 = nil
|
120
|
+
@info2 = nil
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.shutdown
|
124
|
+
Win32::Service.delete(@@service1) if Win32::Service.exists?(@@service1)
|
125
|
+
Win32::Service.delete(@@service2) if Win32::Service.exists?(@@service2)
|
126
|
+
|
127
|
+
@@service1 = nil
|
128
|
+
@@service2 = nil
|
129
|
+
@@command = nil
|
130
|
+
end
|
131
|
+
end
|
@@ -1,179 +1,184 @@
|
|
1
|
-
########################################################################
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# Test case for the Struct::ServiceInfo structure.
|
5
|
-
########################################################################
|
6
|
-
require 'rubygems'
|
7
|
-
gem 'test-unit'
|
8
|
-
|
9
|
-
require 'win32/service'
|
10
|
-
require 'test/unit'
|
11
|
-
|
12
|
-
class
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
end
|
1
|
+
########################################################################
|
2
|
+
# test_win32_service_info.rb
|
3
|
+
#
|
4
|
+
# Test case for the Struct::ServiceInfo structure.
|
5
|
+
########################################################################
|
6
|
+
require 'rubygems'
|
7
|
+
gem 'test-unit'
|
8
|
+
|
9
|
+
require 'win32/service'
|
10
|
+
require 'test/unit'
|
11
|
+
|
12
|
+
class TC_Win32_ServiceInfo_Struct < Test::Unit::TestCase
|
13
|
+
def self.startup
|
14
|
+
@@services = Win32::Service.services
|
15
|
+
end
|
16
|
+
|
17
|
+
def setup
|
18
|
+
@service_info = @@services.find{ |s| s.service_name == 'W32Time' }
|
19
|
+
|
20
|
+
@error_controls = [
|
21
|
+
'critical',
|
22
|
+
'ignore',
|
23
|
+
'normal',
|
24
|
+
'severe',
|
25
|
+
nil
|
26
|
+
]
|
27
|
+
|
28
|
+
@start_types = [
|
29
|
+
'auto start',
|
30
|
+
'boot start',
|
31
|
+
'demand start',
|
32
|
+
'disabled',
|
33
|
+
'system start',
|
34
|
+
nil
|
35
|
+
]
|
36
|
+
|
37
|
+
@types = [
|
38
|
+
'file system driver',
|
39
|
+
'kernel driver',
|
40
|
+
'own process',
|
41
|
+
'share process',
|
42
|
+
'recognizer token',
|
43
|
+
'driver',
|
44
|
+
'win32',
|
45
|
+
'all',
|
46
|
+
'own process, interactive',
|
47
|
+
'share process, interactive',
|
48
|
+
nil
|
49
|
+
]
|
50
|
+
|
51
|
+
@states = [
|
52
|
+
'continue pending',
|
53
|
+
'pause pending',
|
54
|
+
'paused',
|
55
|
+
'running',
|
56
|
+
'start pending',
|
57
|
+
'stop pending',
|
58
|
+
'stopped',
|
59
|
+
nil
|
60
|
+
]
|
61
|
+
|
62
|
+
@controls = [
|
63
|
+
'netbind change',
|
64
|
+
'param change',
|
65
|
+
'pause continue',
|
66
|
+
'pre-shutdown',
|
67
|
+
'shutdown',
|
68
|
+
'stop',
|
69
|
+
'hardware profile change',
|
70
|
+
'power event',
|
71
|
+
'session change',
|
72
|
+
'interrogate'
|
73
|
+
]
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_service_info_info_service_name
|
77
|
+
assert_respond_to(@service_info, :service_name)
|
78
|
+
assert_kind_of(String, @service_info.service_name)
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_service_info_info_display_name
|
82
|
+
assert_respond_to(@service_info, :display_name)
|
83
|
+
assert_kind_of(String, @service_info.display_name)
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_service_info_info_service_type
|
87
|
+
assert_respond_to(@service_info, :service_type)
|
88
|
+
assert(@types.include?(@service_info.service_type))
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_service_info_current_state
|
92
|
+
assert_respond_to(@service_info, :current_state)
|
93
|
+
assert(@states.include?(@service_info.current_state))
|
94
|
+
end
|
95
|
+
|
96
|
+
def test_service_info_controls_accepted
|
97
|
+
assert_respond_to(@service_info, :controls_accepted)
|
98
|
+
assert_kind_of(Array, @service_info.controls_accepted)
|
99
|
+
assert_false(@service_info.controls_accepted.empty?)
|
100
|
+
@service_info.controls_accepted.each{ |control|
|
101
|
+
assert_true(@controls.include?(control))
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_service_info_win32_exit_code
|
106
|
+
assert_respond_to(@service_info, :win32_exit_code)
|
107
|
+
assert_kind_of(Fixnum, @service_info.win32_exit_code)
|
108
|
+
end
|
109
|
+
|
110
|
+
def test_service_info_service_specific_exit_code
|
111
|
+
assert_respond_to(@service_info, :service_specific_exit_code)
|
112
|
+
assert_kind_of(Fixnum, @service_info.service_specific_exit_code)
|
113
|
+
end
|
114
|
+
|
115
|
+
def test_service_info_check_point
|
116
|
+
assert_respond_to(@service_info, :check_point)
|
117
|
+
assert_kind_of(Fixnum, @service_info.check_point)
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_service_info_wait_hint
|
121
|
+
assert_respond_to(@service_info, :wait_hint)
|
122
|
+
assert_kind_of(Fixnum, @service_info.wait_hint)
|
123
|
+
end
|
124
|
+
|
125
|
+
def test_service_info_binary_path_name
|
126
|
+
assert_respond_to(@service_info, :binary_path_name)
|
127
|
+
assert_kind_of(String, @service_info.binary_path_name)
|
128
|
+
end
|
129
|
+
|
130
|
+
def test_service_info_start_type
|
131
|
+
assert_respond_to(@service_info, :start_type)
|
132
|
+
assert(@start_types.include?(@service_info.start_type))
|
133
|
+
end
|
134
|
+
|
135
|
+
def test_service_info_error_control
|
136
|
+
assert_respond_to(@service_info, :error_control)
|
137
|
+
assert(@error_controls.include?(@service_info.error_control))
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_service_info_load_order_group
|
141
|
+
assert_respond_to(@service_info, :load_order_group)
|
142
|
+
assert_kind_of(String, @service_info.load_order_group)
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_service_info_tag_id
|
146
|
+
assert_respond_to(@service_info, :tag_id)
|
147
|
+
assert_kind_of(Fixnum, @service_info.tag_id)
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_service_info_start_name
|
151
|
+
assert_respond_to(@service_info, :start_name)
|
152
|
+
assert_kind_of(String, @service_info.start_name)
|
153
|
+
end
|
154
|
+
|
155
|
+
def test_service_info_dependencies
|
156
|
+
assert_respond_to(@service_info, :dependencies)
|
157
|
+
assert_kind_of(Array, @service_info.dependencies)
|
158
|
+
end
|
159
|
+
|
160
|
+
def test_service_info_description
|
161
|
+
assert_respond_to(@service_info, :description)
|
162
|
+
assert_kind_of(String, @service_info.description)
|
163
|
+
end
|
164
|
+
|
165
|
+
def test_service_info_interactive
|
166
|
+
assert_respond_to(@service_info, :interactive)
|
167
|
+
assert([true, false].include?(@service_info.interactive))
|
168
|
+
end
|
169
|
+
|
170
|
+
def test_service_info_service_flags
|
171
|
+
assert_respond_to(@service_info, :service_flags)
|
172
|
+
assert([0,1].include?(@service_info.service_flags))
|
173
|
+
end
|
174
|
+
|
175
|
+
def teardown
|
176
|
+
@types = nil
|
177
|
+
@states = nil
|
178
|
+
@controls = nil
|
179
|
+
end
|
180
|
+
|
181
|
+
def self.shutdown
|
182
|
+
@@services = nil
|
183
|
+
end
|
184
|
+
end
|