Skip to content

Commit

Permalink
remove success info from slack message and only include failed lanes (#…
Browse files Browse the repository at this point in the history
…539)

## Motivation


## Solution
  • Loading branch information
AnieeG authored Feb 21, 2024
1 parent f219100 commit cd89e45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
11 changes: 4 additions & 7 deletions integration-tests/ccip-tests/testreporters/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,22 +241,19 @@ func (r *CCIPTestReporter) SendSlackNotification(t *testing.T, slackClient *slac
"Run Duration = %.0fm "+
"\nNumber of ccip-send= %d"+
"\nNo of failed requests = %d", r.duration.Minutes(), lane.TotalRequests, lane.FailedCountsByPhase[E2E]))
} else {
msgTexts = append(msgTexts,
fmt.Sprintf("lane %s :white_check_mark:", name),
fmt.Sprintf(
"Run Duration = %.0fm "+
"\nNumber of ccip-send= %d", r.duration.Minutes(), lane.TotalRequests))
}
}

msgTexts = append(msgTexts, fmt.Sprintf(
"\nTest Run Summary created on _remote-test-runner_ at _%s_\nNotifying <@%s>",
r.reportFilePath, testreporters.SlackUserID))
if r.namespace == "" {
r.SetNamespace("ccip")
}
messageBlocks := testreporters.SlackNotifyBlocks(headerText, r.namespace, msgTexts)
ts, err := testreporters.SendSlackMessage(slackClient, slack.MsgOptionBlocks(messageBlocks...))
if err != nil {
return err
return fmt.Errorf("failed to send slack message: %w messageBlocks = %v", err, messageBlocks)
}

return testreporters.UploadSlackFile(slackClient, slack.FileUploadParameters{
Expand Down
6 changes: 0 additions & 6 deletions integration-tests/ccip-tests/testsetups/ccip.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,6 @@ func CCIPDefaultTestSetUp(
}
}
}
if namespace == "" {
if value, set := os.LookupEnv(config.EnvVarNamespace); set && value != "" {
namespace = value
}
}

setUpArgs.Cfg.TestGroupInput.SetTestRunName(namespace)
_, err = os.Stat(setUpArgs.LaneConfigFile)
if err == nil {
Expand Down

0 comments on commit cd89e45

Please sign in to comment.