Skip to content

Commit

Permalink
fix the test assert for the health monitor integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored and Pantani committed Mar 18, 2024
1 parent b9107ad commit b54b50d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/health-monitor/integration/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestHealthMonitor(t *testing.T) {
)
steps := step.NewSteps(
step.New(
step.Stdout(output),
step.Stderr(output),
step.Workdir(app.SourcePath()),
step.PreExec(func() error {
return env.IsAppServed(ctx, servers.API)
Expand All @@ -58,14 +58,14 @@ func TestHealthMonitor(t *testing.T) {
"monitor",
"--rpc-address", servers.RPC,
"--refresh-duration", "1s",
"--close-after", "6s",
"--close-after", "2s",
),
step.PostExec(func(execErr error) error {
if execErr != nil {
return execErr
}
got = output.String()
if !strings.Contains(got, "Chain ID: health-monitor") {
if !strings.Contains(got, "Chain ID: healthmonitor") {
return errors.Errorf("invalid output: %s", got)
}
return nil
Expand All @@ -84,7 +84,7 @@ func TestHealthMonitor(t *testing.T) {
t.FailNow()
}

require.Contains(got, "Chain ID: health-monitor")
require.Contains(got, "Chain ID: healthmonitor")
require.Contains(got, "Version:")
require.Contains(got, "Height:")
require.Contains(got, "Latest Block Hash:")
Expand Down

0 comments on commit b54b50d

Please sign in to comment.