Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hadjri committed Dec 5, 2024
1 parent 29c4635 commit 5fb3290
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions trigger/host_spawn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package trigger

import (
"context"
"fmt"
"testing"

"github.com/evergreen-ci/evergreen"
Expand Down Expand Up @@ -258,7 +257,8 @@ func (s *spawnHostTriggersSuite) TestSpawnHostSetupScriptCompletion() {
slackResponse, ok := n.Payload.(*notification.SlackPayload)
s.Require().True(ok)
s.Require().NotNil(slackResponse)
s.Equal(slackResponse.Body, fmt.Sprintf("The setup script for spawn host <%s|%s> has succeeded", hostURL("", s.h.Id), s.h.Id))
s.Contains(slackResponse.Body, "The setup script for spawn host")
s.Contains(slackResponse.Body, "has succeeded")

sub.Subscriber = event.NewEmailSubscriber("[email protected]")
n, err = s.tSetupScript.Process(&sub)
Expand Down Expand Up @@ -286,7 +286,8 @@ func (s *spawnHostTriggersSuite) TestSpawnHostSetupScriptCompletion() {
slackResponse, ok = n.Payload.(*notification.SlackPayload)
s.Require().True(ok)
s.Require().NotNil(slackResponse)
s.Equal(slackResponse.Body, fmt.Sprintf("The setup script for spawn host <%s|%s> has failed", hostURL("", s.h.Id), s.h.Id))
s.Contains(slackResponse.Body, "The setup script for spawn host")
s.Contains(slackResponse.Body, "has failed")

sub.Subscriber = event.NewEmailSubscriber("[email protected]")
n, err = s.tSetupScript.Process(&sub)
Expand Down Expand Up @@ -316,7 +317,8 @@ func (s *spawnHostTriggersSuite) TestSpawnHostSetupScriptCompletion() {
slackResponse, ok = n.Payload.(*notification.SlackPayload)
s.Require().True(ok)
s.Require().NotNil(slackResponse)
s.Equal(slackResponse.Body, fmt.Sprintf("The setup script for spawn host <%s|%s> has failed to start", hostURL("", s.h.Id), s.h.Id))
s.Contains(slackResponse.Body, "The setup script for spawn host")
s.Contains(slackResponse.Body, "has failed to start")

sub.Subscriber = event.NewEmailSubscriber("[email protected]")
n, err = s.tSetupScript.Process(&sub)
Expand Down

0 comments on commit 5fb3290

Please sign in to comment.