mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-28 20:38:12 +08:00
[MacOS] Pin MongoDB to the specific version defined in the toolset (#4452)
* Define mongodb version installed in the toolset * Searching for latest version of a tool based on a toolset version
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
Describe "MongoDB" {
|
||||
It "mongodb" {
|
||||
"mongo --version" | Should -ReturnZeroExitCode
|
||||
"mongod --version"| Should -ReturnZeroExitCode
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "mongo" }
|
||||
@{ ToolName = "mongod" }
|
||||
) {
|
||||
$toolsetVersion = Get-ToolsetValue 'mongodb.version'
|
||||
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user