-
Notifications
You must be signed in to change notification settings - Fork 173
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
test: change e2e tests to use new log format #3318
Conversation
Signed-off-by: Austin Abro <[email protected]>
✅ Deploy Preview for zarf-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ |
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
Signed-off-by: Austin Abro <[email protected]>
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.
Good changes, one question about unit test coverage of zarfState redactions to make sure we can catch regressions.
@@ -30,7 +32,19 @@ type ZarfE2ETest struct { | |||
ApplianceModeKeep bool | |||
} | |||
|
|||
var logRegex = regexp.MustCompile(`Saving log file to (?P<logFile>.*?\.log)`) | |||
// GetLogger returns the default log configuration for the tests. | |||
func GetLogger(t *testing.T) *slog.Logger { |
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.
👍
suite.NoError(err) | ||
suite.Contains(stdErr, "Published "+ref) |
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.
👍 to fewer suite.Contains
@@ -108,23 +103,6 @@ func TestZarfInit(t *testing.T) { | |||
_, _, _ = e2e.Kubectl(t, "scale", "deploy", "-n", "zarf", "agent-hook", "--replicas=1") //nolint:errcheck | |||
} | |||
|
|||
func checkLogForSensitiveState(t *testing.T, logText string, zarfState types.ZarfState) { |
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.
Do we have unit test coverage for zarfState redactions?
Description
change e2e test to use new log format
Related Issue
Fixes #3304
Checklist before merging