Files
runner-images/images/macos/scripts/tests/Databases.Tests.ps1
Alexey-Ayupov 69db5c6c63 [macOS] Refactor Common.Helpers (#8924)
* [macOS] Refactor Common.Helpers

* Update readme file

* Remove unnecessary double quotes

---------

Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
2023-12-04 12:13:08 +01:00

24 lines
823 B
PowerShell

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-ToolsetContent).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-ToolsetContent).postgresql.version
# Client version
(psql --version).split()[-2] | Should -BeLike "$toolsetVersion*"
# Server version
(pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*"
}
}