Skip to content

Commit

Permalink
fix the it script
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed Jan 10, 2024
1 parent 317e5cb commit 3e5621c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions it/exec-cmd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ if ($null -ne $descriptionValue) {
}
}

$mockServerTest = false
$itTestPath = Join-Path -Path $testPath -ChildPath $mockSeverITFolder
if (Test-Path -Path $itTestPath) {
$mockServerTest = true
}

# Start MockServer if needed
if (!([string]::IsNullOrEmpty($mockSeverITFolder))) {
if ($mockServerTest) {
# Kill any leftover MockServer
Kill-MockServer
Push-Location $mockServerPath
Expand All @@ -80,8 +86,7 @@ if (!([string]::IsNullOrEmpty($mockSeverITFolder))) {

Push-Location $testPath
if ($language -eq "csharp") {
if (!([string]::IsNullOrEmpty($mockSeverITFolder))) {
$itTestPath = Join-Path -Path $testPath -ChildPath $mockSeverITFolder
if ($mockServerTest) {
Push-Location $itTestPath

$itTestPathSources = Join-Path -Path $testPath -ChildPath "client"
Expand All @@ -104,8 +109,7 @@ if ($language -eq "csharp") {
}
}
elseif ($language -eq "java") {
if (!([string]::IsNullOrEmpty($mockSeverITFolder))) {
$itTestPath = Join-Path -Path $testPath -ChildPath $mockSeverITFolder
if ($mockServerTest) {
Push-Location $itTestPath

$itTestPathSources = Join-Path -Path $testPath -ChildPath "src" -AdditionalChildPath "*"
Expand All @@ -128,8 +132,7 @@ elseif ($language -eq "java") {
}
}
elseif ($language -eq "go") {
if (!([string]::IsNullOrEmpty($mockSeverITFolder))) {
$itTestPath = Join-Path -Path $testPath -ChildPath $mockSeverITFolder
if ($mockServerTest) {
Push-Location $itTestPath

$itTestPathSources = Join-Path -Path $testPath -ChildPath "client"
Expand Down Expand Up @@ -182,8 +185,7 @@ elseif ($language -eq "python") {
mypy integration_test
} -ErrorAction Stop

if (!([string]::IsNullOrEmpty($mockSeverITFolder))) {
$itTestPath = Join-Path -Path $testPath -ChildPath $mockSeverITFolder
if ($mockServerTest) {
Push-Location $itTestPath

$itTestPathSources = Join-Path -Path $testPath -ChildPath "integration_test" -AdditionalChildPath "client"
Expand Down

0 comments on commit 3e5621c

Please sign in to comment.