Skip to content

Commit

Permalink
fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
NiniOak committed Feb 2, 2023
1 parent 7adb134 commit 1c3005b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/integration/consul-container/libs/service/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,21 @@ func (g ConnectContainer) GetAddr() (string, int) {
}

func (g ConnectContainer) Restart() error {
_, err := g.container.State(g.ctx)
_, err := g.GetStatus()
if err != nil {
return fmt.Errorf("error get connect container state %s", err)
return fmt.Errorf("error fetching sidecar container state %s", err)
}

fmt.Printf("Stopping container: %s\n", g.GetName())
err = g.container.Stop(g.ctx, nil)

if err != nil {
return fmt.Errorf("error stopping connect container %s", err)
return fmt.Errorf("error stopping sidecar container %s", err)
}

fmt.Printf("Starting container: %s\n", g.GetName())
err = g.container.Start(g.ctx)
if err != nil {
return fmt.Errorf("error starting connect container %s", err)
return fmt.Errorf("error starting sidecar container %s", err)
}
return nil
}
Expand Down

0 comments on commit 1c3005b

Please sign in to comment.