@@ -67,6 +67,7 @@ func Test_Windows2022_AzureNetwork(t *testing.T) {
6767 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
6868 ValidateCiliumIsNotRunningWindows (ctx , s )
6969 ValidateDotnetNotInstalledWindows (ctx , s )
70+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
7071 },
7172 },
7273 })
@@ -88,6 +89,7 @@ func Test_Windows2022AzureOverlayNetworkDualStack(t *testing.T) {
8889 ValidateFileHasContent (ctx , s , "/k/kubeletstart.ps1" , "--container-runtime=remote" )
8990 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
9091 ValidateCiliumIsNotRunningWindows (ctx , s )
92+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
9193 },
9294 },
9395 })
@@ -110,6 +112,7 @@ func Test_Windows2022Gen2AzureNetwork(t *testing.T) {
110112 ValidateCiliumIsNotRunningWindows (ctx , s )
111113 ValidateDotnetNotInstalledWindows (ctx , s )
112114 ValidateFileHasContent (ctx , s , "/AzureData/CustomDataSetupScript.log" , "CSEScriptsPackageUrl used for provision is https://packages.aks.azure.com/aks/windows/cse/aks-windows-cse-scripts-current.zip" )
115+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
113116 },
114117 },
115118 })
@@ -132,6 +135,7 @@ func Test_Windows2022Gen2AzureOverlayNetworkDualStack(t *testing.T) {
132135 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
133136 ValidateCiliumIsNotRunningWindows (ctx , s )
134137 ValidateFileHasContent (ctx , s , "/AzureData/CustomDataSetupScript.log" , "CSEScriptsPackageUrl used for provision is https://packages.aks.azure.com/aks/windows/cse/aks-windows-cse-scripts-current.zip" )
138+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
135139 },
136140 },
137141 })
@@ -152,6 +156,7 @@ func Test_Windows23H2AzureNetwork(t *testing.T) {
152156 ValidateFileHasContent (ctx , s , "/k/kubeletstart.ps1" , "--container-runtime=remote" )
153157 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
154158 ValidateCiliumIsNotRunningWindows (ctx , s )
159+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
155160 },
156161 },
157162 })
@@ -173,6 +178,7 @@ func Test_Windows23H2AzureOverlayNetworkDualStack(t *testing.T) {
173178 ValidateFileHasContent (ctx , s , "/k/kubeletstart.ps1" , "--container-runtime=remote" )
174179 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
175180 ValidateCiliumIsNotRunningWindows (ctx , s )
181+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
176182 },
177183 },
178184 })
@@ -194,6 +200,7 @@ func Test_Windows23H2Gen2AzureNetwork(t *testing.T) {
194200 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
195201 ValidateCiliumIsNotRunningWindows (ctx , s )
196202 ValidateFileHasContent (ctx , s , "/AzureData/CustomDataSetupScript.log" , "CSEScriptsPackageUrl used for provision is https://packages.aks.azure.com/aks/windows/cse/aks-windows-cse-scripts-current.zip" )
203+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
197204 },
198205 },
199206 })
@@ -216,6 +223,7 @@ func Test_Windows23H2Gen2AzureOverlayDualStack(t *testing.T) {
216223 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
217224 ValidateCiliumIsNotRunningWindows (ctx , s )
218225 ValidateFileHasContent (ctx , s , "/AzureData/CustomDataSetupScript.log" , "CSEScriptsPackageUrl used for provision is https://packages.aks.azure.com/aks/windows/cse/aks-windows-cse-scripts-current.zip" )
226+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
219227 },
220228 },
221229 })
@@ -277,6 +285,7 @@ func Test_Windows2025(t *testing.T) {
277285 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
278286 ValidateCiliumIsNotRunningWindows (ctx , s )
279287 ValidateDotnetNotInstalledWindows (ctx , s )
288+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
280289 },
281290 },
282291 })
@@ -300,6 +309,7 @@ func Test_Windows2025Gen2(t *testing.T) {
300309 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
301310 ValidateCiliumIsNotRunningWindows (ctx , s )
302311 ValidateDotnetNotInstalledWindows (ctx , s )
312+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
303313 },
304314 },
305315 })
@@ -329,6 +339,7 @@ func Test_Windows2022_SecureTLSBootstrapping_BootstrapToken_Fallback(t *testing.
329339 ValidateFileHasContent (ctx , s , "/k/kubeletstart.ps1" , "--container-runtime=remote" )
330340 ValidateCiliumIsNotRunningWindows (ctx , s )
331341 ValidateDotnetNotInstalledWindows (ctx , s )
342+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
332343 },
333344 },
334345 })
@@ -382,6 +393,7 @@ func Test_Windows2022_VHDCaching(t *testing.T) {
382393 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
383394 ValidateCiliumIsNotRunningWindows (ctx , s )
384395 ValidateDotnetNotInstalledWindows (ctx , s )
396+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
385397 },
386398 },
387399 })
@@ -406,6 +418,7 @@ func Test_Windows2022Gen2_k8s_133(t *testing.T) {
406418 ValidateFileHasContent (ctx , s , "/k/kubeletstart.ps1" , "--container-runtime=remote" )
407419 ValidateCiliumIsNotRunningWindows (ctx , s )
408420 ValidateDotnetNotInstalledWindows (ctx , s )
421+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
409422 },
410423 },
411424 })
@@ -427,6 +440,7 @@ func Test_Windows23H2_Cilium2(t *testing.T) {
427440 ValidateFileHasContent (ctx , s , "/k/kubeletstart.ps1" , "--container-runtime=remote" )
428441 ValidateWindowsProcessHasCliArguments (ctx , s , "kubelet.exe" , []string {"--rotate-certificates=true" , "--client-ca-file=c:\\ k\\ ca.crt" })
429442 ValidateCiliumIsRunningWindows (ctx , s )
443+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
430444 },
431445 },
432446 })
@@ -448,6 +462,7 @@ func Test_Windows23H2Gen2_WindowsCiliumNetworking(t *testing.T) {
448462 },
449463 Validator : func (ctx context.Context , s * Scenario ) {
450464 ValidateWindowsCiliumIsRunning (ctx , s )
465+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
451466 },
452467 },
453468 })
@@ -474,6 +489,7 @@ func Test_Windows2022_McrChinaCloud_Windows(t *testing.T) {
474489 `C:\ProgramData\containerd\certs.d\mcr.azk8s.cn\hosts.toml` ,
475490 `https://mcr.azk8s.cn` )
476491 ValidateDotnetNotInstalledWindows (ctx , s )
492+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
477493 },
478494 },
479495 })
@@ -508,6 +524,7 @@ func Test_Windows2025Gen2_McrChinaCloud_Windows(t *testing.T) {
508524 ValidateFileHasContent (ctx , s ,
509525 `C:\ProgramData\containerd\certs.d\mcr.azk8s.cn\hosts.toml` ,
510526 `https://mcr.azk8s.cn` )
527+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
511528 },
512529 },
513530 })
@@ -553,6 +570,7 @@ func Test_NetworkIsolatedCluster_Windows_WithEgress(t *testing.T) {
553570 ValidateFileExists (ctx , s , `C:\ProgramData\containerd\certs.d\mcr.microsoft.com\hosts.toml` )
554571 ValidateFileDoesNotExist (ctx , s , `C:\ProgramData\containerd\certs.d\mcr.azk8s.cn\hosts.toml` )
555572 ValidateDotnetNotInstalledWindows (ctx , s )
573+ ValidateWindowsSystemServicesRestartConfiguration (ctx , s )
556574 },
557575 },
558576 })
0 commit comments