@@ -24,6 +24,9 @@ TEST_CASE("InstallFlow_WindowsFeatureDoesNotExist", "[windowsFeature]")
24
24
25
25
TestCommon::TempFile installResultPath (" TestExeInstalled.txt" );
26
26
27
+ TestCommon::TestUserSettings testSettings;
28
+ testSettings.Set <Setting::EFWindowsFeature>(true );
29
+
27
30
std::ostringstream installOutput;
28
31
TestContext context{ installOutput, std::cin };
29
32
auto previousThreadGlobals = context.SetForCurrentThread ();
@@ -57,6 +60,9 @@ TEST_CASE("InstallFlow_FailedToEnableWindowsFeature", "[windowsFeature]")
57
60
58
61
TestCommon::TempFile installResultPath (" TestExeInstalled.txt" );
59
62
63
+ TestCommon::TestUserSettings testSettings;
64
+ testSettings.Set <Setting::EFWindowsFeature>(true );
65
+
60
66
std::ostringstream installOutput;
61
67
TestContext context{ installOutput, std::cin };
62
68
auto previousThreadGlobals = context.SetForCurrentThread ();
@@ -92,6 +98,9 @@ TEST_CASE("InstallFlow_FailedToEnableWindowsFeature_Force", "[windowsFeature]")
92
98
93
99
TestCommon::TempFile installResultPath (" TestExeInstalled.txt" );
94
100
101
+ TestCommon::TestUserSettings testSettings;
102
+ testSettings.Set <Setting::EFWindowsFeature>(true );
103
+
95
104
// Override with arbitrary DISM api error (DISMAPI_E_DISMAPI_NOT_INITIALIZED) and make windows feature discoverable.
96
105
HRESULT dismErrorResult = 0xc0040001 ;
97
106
LocIndString testFeatureDisplayName = LocIndString{ " Test Windows Feature" _liv };
@@ -139,6 +148,9 @@ TEST_CASE("InstallFlow_RebootRequired", "[windowsFeature]")
139
148
140
149
TestCommon::TempFile installResultPath (" TestExeInstalled.txt" );
141
150
151
+ TestCommon::TestUserSettings testSettings;
152
+ testSettings.Set <Setting::EFWindowsFeature>(true );
153
+
142
154
// Override with reboot required HRESULT.
143
155
auto mockDismHelperOverride = TestHook::MockDismHelper_Override ();
144
156
auto setEnableFeatureOverride = TestHook::SetEnableWindowsFeatureResult_Override (ERROR_SUCCESS_REBOOT_REQUIRED);
@@ -173,6 +185,9 @@ TEST_CASE("InstallFlow_RebootRequired_Force", "[windowsFeature]")
173
185
174
186
TestCommon::TempFile installResultPath (" TestExeInstalled.txt" );
175
187
188
+ TestCommon::TestUserSettings testSettings;
189
+ testSettings.Set <Setting::EFWindowsFeature>(true );
190
+
176
191
// Override with reboot required HRESULT.
177
192
auto mockDismHelperOverride = TestHook::MockDismHelper_Override ();
178
193
auto setEnableFeatureOverride = TestHook::SetEnableWindowsFeatureResult_Override (ERROR_SUCCESS_REBOOT_REQUIRED);
0 commit comments