Files
runner-images/images/macos/tests/Databases.Tests.ps1
2023-05-12 13:30:13 +02:00

23 lines
830 B
PowerShell

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion
Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
It "<ToolName>" -TestCases @(
@{ ToolName = "mongo" }
@{ ToolName = "mongod" }
) {
$toolsetVersion = Get-ToolsetValue 'mongodb.version'
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
}
}
Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsVenturaArm64) {
It "PostgreSQL version should correspond to the version in the toolset" {
$toolsetVersion = Get-ToolsetValue 'postgresql.version'
# Client version
(psql --version).split()[-2] | Should -BeLike "$toolsetVersion*"
# Server version
(pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*"
}
}