Files

24 lines
859 B
PowerShell
Raw Permalink Normal View History

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion
2024-09-03 18:45:06 +02:00
Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
It "<ToolName>" -TestCases @(
@{ ToolName = "mongo" }
@{ ToolName = "mongod" }
) {
2023-12-04 12:13:08 +01:00
$toolsetVersion = (Get-ToolsetContent).mongodb.version
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
}
}
2024-09-03 18:45:06 +02:00
Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
It "PostgreSQL version should correspond to the version in the toolset" {
2023-12-04 12:13:08 +01:00
$toolsetVersion = (Get-ToolsetContent).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*"
}
}