-
Notifications
You must be signed in to change notification settings - Fork 66
✨ API Call Alerts #2139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
✨ API Call Alerts #2139
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package e2e | |
|
||
import ( | ||
"context" | ||
"fmt" | ||
"os" | ||
"testing" | ||
|
||
|
@@ -24,7 +25,7 @@ var ( | |
) | ||
|
||
const ( | ||
testSummaryOutputEnvVar = "GITHUB_STEP_SUMMARY" | ||
testSummaryOutputEnvVar = "E2E_SUMMARY_OUTPUT" | ||
testCatalogRefEnvVar = "CATALOG_IMG" | ||
testCatalogName = "test-catalog" | ||
latestImageTag = "latest" | ||
|
@@ -39,8 +40,18 @@ func TestMain(m *testing.M) { | |
utilruntime.Must(err) | ||
|
||
res := m.Run() | ||
err = utils.PrintSummary(testSummaryOutputEnvVar) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was looking and seem that should be skiped already see: https://github.com/operator-framework/operator-controller/blob/main/test/utils/summary.go#L175-L198 Then, why we just call it here and not in all e2e tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to keep the mechanism of selecting output destination distinct in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But each test has one suite right:
So, why we use it only in this one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The summary is also generated for experimental e2e, you can see it in here. The upgrade and extension developer tests are pretty pointless to run prometheus on because they only have about a few seconds of actual runtime. |
||
utilruntime.Must(err) | ||
|
||
path := os.Getenv(testSummaryOutputEnvVar) | ||
if path == "" { | ||
fmt.Printf("Note: E2E_SUMMARY_OUTPUT is unset; skipping summary generation") | ||
} else { | ||
err = utils.PrintSummary(path) | ||
if err != nil { | ||
// Fail the run if alerts are found | ||
fmt.Printf("%s", err) | ||
os.Exit(1) | ||
} | ||
} | ||
os.Exit(res) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
I think is better keep generic since we can run the same with or not GITHUB
Very cool