Skip to content

Commit f6eb775

Browse files
committed
- Fixed failing unit test: TestPlugins.testServices. Service 'WebClient' does not exists anymore on AppVeyor's CI build servers.
- Modified unit test to use `gupdate` service for detecting a "Stopped" service.
1 parent 411cf1f commit f6eb775

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/tests/TestPlugins.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ namespace shellanything
292292
//TODO: complete with known path to files
293293
#endif
294294

295-
//Define the list of expected properties
295+
//Define the list of expected properties
296296
ra::strings::StringVector expected_properties;
297297
expected_properties.push_back("sa_plugin_services.WinDefend.status");
298298
expected_properties.push_back("sa_plugin_services.Dhcp.status");
@@ -302,6 +302,8 @@ namespace shellanything
302302
expected_properties.push_back("sa_plugin_services.Fax.status");
303303
expected_properties.push_back("sa_plugin_services.msiserver.status");
304304
expected_properties.push_back("sa_plugin_services.WebClient.status");
305+
expected_properties.push_back("sa_plugin_services.defragsvc.status");
306+
expected_properties.push_back("sa_plugin_services.gupdate.status");
305307
expected_properties.push_back("sa_plugin_services.aaaa.status");
306308

307309
//Clear expected properties
@@ -330,7 +332,7 @@ namespace shellanything
330332
static const std::string& STATUS_STOPPED = "stopped";
331333
static const std::string& STATUS_EMPTY = "";
332334
ASSERT_EQ(STATUS_RUNNING, pmgr.GetProperty("sa_plugin_services.Dhcp.status"));
333-
ASSERT_EQ(STATUS_STOPPED, pmgr.GetProperty("sa_plugin_services.WebClient.status"));
335+
ASSERT_EQ(STATUS_STOPPED, pmgr.GetProperty("sa_plugin_services.gupdate.status"));
334336
ASSERT_EQ(STATUS_EMPTY, pmgr.GetProperty("sa_plugin_services.aaaa.status"));
335337

336338
//Cleanup

src/tests/test_files/TestPlugins.testServices.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
msiserver Windows Installer
2323
mpssvc Windows Defender Firewall
2424
WebClient WebClient
25+
defragsvc Optimize drives
26+
gupdate Google Update Service (gupdate)
2527
-->
2628
<property name="sa_plugin_services.names" value=""/>
2729
<property name="sa_plugin_services.names" value="WinDefend;${sa_plugin_services.names}"/>
@@ -33,6 +35,8 @@
3335
<property name="sa_plugin_services.names" value="msiserver;${sa_plugin_services.names}"/>
3436
<property name="sa_plugin_services.names" value="mpssvc;${sa_plugin_services.names}"/>
3537
<property name="sa_plugin_services.names" value="WebClient;${sa_plugin_services.names}"/>
38+
<property name="sa_plugin_services.names" value="defragsvc;${sa_plugin_services.names}"/>
39+
<property name="sa_plugin_services.names" value="gupdate;${sa_plugin_services.names}"/>
3640
<property name="sa_plugin_services.names" value="aaaa;${sa_plugin_services.names}"/>
3741
</default>
3842

0 commit comments

Comments
 (0)