From 1e88d843a88605b07ecf778b81a3a8be4809290f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 14 Jan 2024 18:47:57 +0100 Subject: [PATCH] cleanup --- build.ps1 | 3 +-- tests/agent.Tests.ps1 | 6 ++++++ tests/inbound-agent.Tests.ps1 | 10 +++++----- tests/test_helpers.psm1 | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/build.ps1 b/build.ps1 index b512b01bc..acc27485d 100644 --- a/build.ps1 +++ b/build.ps1 @@ -10,8 +10,7 @@ Param( ) $ErrorActionPreference = 'Stop' -# $AgentTypes = @('agent', 'inbound-agent') -$AgentTypes = @('inbound-agent') +$AgentTypes = @('agent', 'inbound-agent') if ($AgentType -ne '' -and $AgentType -in $AgentTypes) { $AgentTypes = @($AgentType) } diff --git a/tests/agent.Tests.ps1 b/tests/agent.Tests.ps1 index 98a1cd9a7..c424c03d6 100644 --- a/tests/agent.Tests.ps1 +++ b/tests/agent.Tests.ps1 @@ -26,6 +26,12 @@ if($global:WINDOWSFLAVOR -eq 'nanoserver') { $global:GITLFSVERSION = '3.4.1' +# # Uncomment to help debugging when working on this script +# Write-Host "= DEBUG: global vars" +# Get-Variable -Scope Global | ForEach-Object { Write-Host "$($_.Name) = $($_.Value)" } +# Write-Host "= DEBUG: env vars" +# Get-ChildItem Env: | ForEach-Object { Write-Host "$($_.Name) = $($_.Value)" } + Cleanup($global:CONTAINERNAME) Describe "[$global:IMAGE_NAME] image is present" { diff --git a/tests/inbound-agent.Tests.ps1 b/tests/inbound-agent.Tests.ps1 index b8b10c43c..7dd771145 100644 --- a/tests/inbound-agent.Tests.ps1 +++ b/tests/inbound-agent.Tests.ps1 @@ -20,11 +20,11 @@ if($global:WINDOWSFLAVOR -eq 'nanoserver') { $global:CONTAINERSHELL = "pwsh.exe" } -# Uncomment to help debugging when working on this script -Write-Host "= DEBUG: global vars" -Get-Variable -Scope Global | ForEach-Object { Write-Host "$($_.Name) = $($_.Value)" } -Write-Host "= DEBUG: env vars" -Get-ChildItem Env: | ForEach-Object { Write-Host "$($_.Name) = $($_.Value)" } +# # Uncomment to help debugging when working on this script +# Write-Host "= DEBUG: global vars" +# Get-Variable -Scope Global | ForEach-Object { Write-Host "$($_.Name) = $($_.Value)" } +# Write-Host "= DEBUG: env vars" +# Get-ChildItem Env: | ForEach-Object { Write-Host "$($_.Name) = $($_.Value)" } Cleanup($global:CONTAINERNAME) Cleanup("nmap") diff --git a/tests/test_helpers.psm1 b/tests/test_helpers.psm1 index e3f8edf9c..8a2e6e054 100644 --- a/tests/test_helpers.psm1 +++ b/tests/test_helpers.psm1 @@ -97,7 +97,7 @@ function Is-ContainerRunning($container='') { } } -function Run-Program($cmd, $params, $quiet=$false) { +function Run-Program($cmd, $params, $quiet=$true) { if(-not $quiet) { Write-Host "cmd & params: $cmd $params" }