Skip to content

Commit

Permalink
Add a sleep to work around delay in configuration in server (#294)
Browse files Browse the repository at this point in the history
Similar to #289, we want to have a sleep in another scenario
  • Loading branch information
matt-richardson authored Oct 30, 2021
1 parent 369f6e8 commit fddf416
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
6 changes: 3 additions & 3 deletions E2ETests/Scenarios/Server_Scenario_01_Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ Configuration Server_Scenario_01_Install
{
SetScript = {
Start-Sleep -seconds 120
Set-Content c:\temp\SleepAfterInstallHasHappened.txt -value "true"
Set-Content c:\temp\SleepAfterInstallHasHappened_Server_Scenario_01_Install.txt -value "true"
}
TestScript = {
return Test-Path c:\temp\SleepAfterInstallHasHappened.txt
return Test-Path c:\temp\SleepAfterInstallHasHappened_Server_Scenario_01_Install.txt
}
GetScript = {
@{
Result = Test-Path c:\temp\SleepAfterInstallHasHappened.txt
Result = Test-Path c:\temp\SleepAfterInstallHasHappened_Server_Scenario_01_Install.txt
}
}
DependsOn = "[cOctopusServerUsernamePasswordAuthentication]EnableUsernamePasswordAuth"
Expand Down
22 changes: 20 additions & 2 deletions E2ETests/Scenarios/Server_Scenario_07_Reinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,38 @@ Configuration Server_Scenario_07_Reinstall
AllowCollectionOfUsageStatistics = $false
}

cOctopusServerUsernamePasswordAuthentication "Enable Username/Password Auth"
cOctopusServerUsernamePasswordAuthentication "EnableUsernamePasswordAuth"
{
InstanceName = "OctopusServer"
Enabled = $true
DependsOn = "[cOctopusServer]OctopusServer"
}

#hack until https://github.com/OctopusDeploy/Issues/issues/7113 is resolved
Script "SleepForABitToWorkaroundServerBug"
{
SetScript = {
Start-Sleep -seconds 120
Set-Content c:\temp\SleepAfterInstallHasHappened_Server_Scenario_07_Reinstall.txt -value "true"
}
TestScript = {
return Test-Path c:\temp\SleepAfterInstallHasHappened_Server_Scenario_07_Reinstall.txt
}
GetScript = {
@{
Result = Test-Path c:\temp\SleepAfterInstallHasHappened_Server_Scenario_07_Reinstall.txt
}
}
DependsOn = "[cOctopusServerUsernamePasswordAuthentication]EnableUsernamePasswordAuth"
}

cOctopusEnvironment "Create 'UAT 1' Environment"
{
Url = "http://localhost:81"
Ensure = "Present"
OctopusCredentials = $cred
EnvironmentName = "UAT 1"
DependsOn = "[cOctopusServer]OctopusServer"
DependsOn = "[Script]SleepForABitToWorkaroundServerBug"
}

Script "Create Api Key and set environment variables for tests"
Expand Down

0 comments on commit fddf416

Please sign in to comment.