2023-05-05 12:13:47 +02:00
|
|
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
|
|
|
|
|
|
|
|
|
$os = Get-OSVersion
|
|
|
|
|
|
2023-11-10 18:53:24 +01:00
|
|
|
Describe "MongoDB" -Skip:($os.IsVentura -or $os.IsSonoma) {
|
2021-11-11 16:14:27 +03:00
|
|
|
It "<ToolName>" -TestCases @(
|
|
|
|
|
@{ ToolName = "mongo" }
|
|
|
|
|
@{ ToolName = "mongod" }
|
|
|
|
|
) {
|
|
|
|
|
$toolsetVersion = Get-ToolsetValue 'mongodb.version'
|
|
|
|
|
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
|
2021-01-14 00:46:44 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-10 18:53:24 +01:00
|
|
|
Describe "PostgreSQL" -Skip:($os.IsVentura -or $os.IsSonoma) {
|
2021-11-16 11:43:59 +03:00
|
|
|
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*"
|
2021-11-16 11:43:59 +03:00
|
|
|
# Server version
|
2022-08-29 14:29:38 +03:00
|
|
|
(pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*"
|
2021-01-14 00:46:44 +07:00
|
|
|
}
|
2023-11-09 11:29:07 +01:00
|
|
|
}
|