Skip to content

Commit

Permalink
Update command_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-hashicorp committed Dec 10, 2024
1 parent ca66c5a commit dacfc8e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions subcommand/health-sync/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,15 @@ func TestRun(t *testing.T) {
expCheck.Status = ecsHealthToConsulHealth(hsc.status)
// If there are multiple health sync containers and one of them is unhealthy
// then the service check should be critical.
if len(c.healthSyncContainers) > 1 {
for containerName := range c.healthSyncContainers {
log.Printf("Container Name: %s, ActualStatus:%s \n", containerName, c.healthSyncContainers[containerName].status)
if c.healthSyncContainers[containerName].status == ecs.HealthStatusUnhealthy {
expCheck.Status = api.HealthCritical
markDataplaneContainerUnhealthy = true
break
}
for containerName := range c.healthSyncContainers {
log.Printf("Container Name: %s, ActualStatus:%s \n", containerName, c.healthSyncContainers[containerName].status)
if c.healthSyncContainers[containerName].status == ecs.HealthStatusUnhealthy {
expCheck.Status = api.HealthCritical
markDataplaneContainerUnhealthy = true
break
}
}

}
found = true
break
Expand Down

0 comments on commit dacfc8e

Please sign in to comment.