Files
runner-images/images/macos/scripts/tests/Databases.Tests.ps1
T

24 lines
819 B
PowerShell
Raw Normal View History

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion
Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsSonoma) {
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.IsSonoma) {
It "PostgreSQL version should correspond to the version in the toolset" {
$toolsetVersion = Get-ToolsetValue 'postgresql.version'
# Client version
2022-08-29 14:29:38 +03:00
(psql --version).split()[-2] | Should -BeLike "$toolsetVersion*"
# Server version
2022-08-29 14:29:38 +03:00
(pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*"
}
}