Public/Utilities/Test-EdenServiceCommands.ps1
function Test-EdenServiceCommands { <# .SYNOPSIS Runs all commands for the current project (folder with a ./Eden subfolder). .DESCRIPTION Gets the list of Eden service commands that are support for the current project. It then executes each command using the Settings you name. .EXAMPLE PS> Test-EdenSericeCommands or PS> e-ut Runs all supported commands using the default settings. .EXAMPLE PS> Test-EdenSericeCommands MySettings or PS> e-ut MySettings Runs all supported commands using the MySettings settings file (in either ./Eden/Settings/.local/MySettings.json or ./Eden/Settings/MySettings.json) #> [CmdletBinding()] param( # The name of the settings to pass to each command. [Parameter()] [String] $SettingsName ) $settings = Get-EdenSettings $SettingsName $loggingPrefix = "$($settings.SolutionName) $($settings.ServiceName) $($settings.Name) Utilities Testing" $commands = (Get-EdenServiceCommandList | Where-Object { $_.Testable -eq $true }) foreach ($command in $commands) { if (!$command.TestContinuous) { $setName = $command.TestSettings if ($null -eq $setName -and $null -ne $SettingsName) { $setName = $SettingsName } Write-EdenInfo "Running command '$($command.Command)' with settings '$($setName)'" $loggingPrefix $result = & $command.Command -SettingsName $command.TestSettings } } } New-Alias ` -Name e-ut ` -Value Test-EdenServiceCommands ` -Force |