Merge main into install-codeql-bundle.

This commit is contained in:
Chris Gavin
2020-09-16 07:50:05 +01:00
161 changed files with 8253 additions and 1184 deletions

View File

@@ -17,13 +17,14 @@ Describe "Chrome" {
Context "Browser" {
$chromeRegPath = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe"
$chromePath = (Get-ItemProperty $chromeRegPath).'(default)'
It "Chrome '<chromeRegPath>' registry path exists" -TestCases @{chromeRegPath = $chromeRegPath} {
$chromeRegPath | Should -Exist
}
It "Chrome VersionInfo registry value exists" -TestCases @{chromeRegPath = $chromeRegPath} {
$versionInfo = (Get-Item (Get-ItemProperty $chromeRegPath).'(Default)').VersionInfo
It "Chrome VersionInfo registry value exists" -TestCases @{chromePath = $chromePath} {
$versionInfo = (Get-Item $chromePath).VersionInfo
$versionInfo | Should -Not -BeNullOrEmpty
}
@@ -41,8 +42,10 @@ Describe "Chrome" {
Get-NetFirewallRule -DisplayName BlockGoogleUpdate | Should -Not -BeNullOrEmpty
}
It "chrome.exe is installed" {
"${env:ProgramFiles(x86)}\Google\Chrome\Application\chrome.exe" | Should -Exist
It "<chromePath> is installed" -TestCases @{chromePath = $chromePath} {
$chromeName = (Get-Item $chromePath).Name
$chromePath | Should -Exist
$chromeName | Should -BeExactly "chrome.exe"
}
}
}

View File

@@ -1,6 +1,6 @@
$releaseIndexUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json"
$dotnetChannels = (New-Object system.net.webclient).DownloadString($releaseIndexUrl) | ConvertFrom-Json
$dotnetVersions = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol')) } | Select-Object -ExpandProperty "channel-version"
$dotnetVersions = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol') -and !$_."support-phase".Equals('rc')) } | Select-Object -ExpandProperty "channel-version"
Describe "Dotnet SDK" {

View File

@@ -139,7 +139,7 @@ Describe "InnoSetup" {
}
}
Describe "GoogleCouldSDK" {
Describe "GoogleCloudSDK" {
It "<ToolName>" -TestCases @(
@{ ToolName = "bq" }
@{ ToolName = "gcloud" }
@@ -196,6 +196,12 @@ Describe "PowerShell Core" {
}
}
Describe "Pulumi" {
It "pulumi" {
"pulumi version" | Should -ReturnZeroExitCode
}
}
Describe "Sbt" {
It "sbt" {
"sbt --version" | Should -ReturnZeroExitCode

View File

@@ -32,10 +32,28 @@ Describe "ContainersFeature" {
}
Describe "DiskSpace" {
it "The image has enough disk space"{
It "The image has enough disk space"{
$availableSpaceMB = [math]::Round((Get-PSDrive -Name C).Free / 1MB)
$minimumFreeSpaceMB = 18 * 1024
$availableSpaceMB | Should -BeGreaterThan $minimumFreeSpaceMB
}
}
Describe "DynamicPorts" {
It "Test TCP dynamicport start=49152 num=16384" {
$tcpPorts = Get-NetTCPSetting | Where-Object {$_.SettingName -ne "Automatic"} | Where-Object {
$_.DynamicPortRangeStartPort -ne 49152 -or $_.DynamicPortRangeNumberOfPorts -ne 16384
}
$tcpPorts | Should -BeNullOrEmpty
}
It "Test UDP dynamicport start=49152 num=16384" {
$udpPorts = Get-NetUDPSetting | Where-Object {
$_.DynamicPortRangeStartPort -ne 49152 -or $_.DynamicPortRangeNumberOfPorts -ne 16384
}
$udpPorts | Should -BeNullOrEmpty
}
}