Skip to content

Commit

Permalink
[Windows] Update google updater service name parser (actions#9738)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-pyshnoi authored and guicaulada committed Jun 11, 2024
1 parent 76c1d0b commit cca605b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion images/windows/scripts/build/Install-Chrome.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Install-Binary `
Write-Host "Adding the firewall rule for Google update blocking..."
New-NetFirewallRule -DisplayName "BlockGoogleUpdate" -Direction Outbound -Action Block -Program "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe"

$googleServices = @('gupdate', 'gupdatem') | Get-Service
$googleServices = Get-Service -Name "GoogleUpdater*"
Stop-Service $googleServices
$googleServices.WaitForStatus('Stopped', "00:01:00")
$googleServices | Set-Service -StartupType Disabled
Expand Down
13 changes: 5 additions & 8 deletions images/windows/scripts/tests/Browsers.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ Describe "Chrome" {
$versionInfo | Should -Not -BeNullOrEmpty
}

It "gupdate service is stopped" {
$svc = Get-Service -Name gupdate
$svc.Status | Should -BeExactly Stopped
}

It "gupdatem service is stopped" {
$svc = Get-Service -Name gupdatem
$svc.Status | Should -BeExactly Stopped
It "GoogleUpdater services is stopped" {
$services = Get-Service -Name "GoogleUpdater*"
foreach ($svc in $services) {
$svc.Status | Should -BeExactly 'Stopped'
}
}

It "BlockGoogleUpdate firewall rule exists" {
Expand Down

0 comments on commit cca605b

Please sign in to comment.