-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.ps1
32 lines (21 loc) · 893 Bytes
/
start.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
docker-compose up --build -d
Start-Sleep -Seconds 2
# Launch integration tests
docker-compose exec ftp-client java -cp "target/test-classes:target/classes:target/dependency/testng-7.4.0.jar:target/dependency/jcommander-1.78.jar:target/dependency/jquery-3.5.1.jar" org.testng.TestNG integration-testng.xml
$passed = docker-compose exec ftp-client cat passed
# Check tests status
if ($passed -eq "false") {
Write-Output "Integration tests failed. Terminating network..."
docker-compose down
Clear-Host
Write-Output "Integration tests failed. Docker network has been terminated."
exit 0
}
Clear-Host
Write-Output "Integration tests successfully passed."
Write-Output "Type 'start' and press Enter to initiate the session."
docker attach ftp-client
Clear-Host
docker-compose down
Clear-Host
Write-Output "App closed successfully. Docker network has been terminated."