-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the test context in Reconcile tests
The reconcile tests setup a test context along with other test assets using the test.controller module. The context however is not returned as part of the assets, so when we invoke `Reconcile` in reconciler tests we pass a fresh `context.Background()` which does not include the test logger. This causes log lines from taskrun.go and pipelinerun.go to be logged with a different format and with INFO log level instead of the DEBUG one required to troubleshoot test failures. This PR fixes that by adding the context to the test assets, and passing it to `Reconcile`. See #3282 (comment) for more context and results with a forced test failure. Follows up #3282, works towards #2992 Signed-off-by: Andrea Frittoli <[email protected]>
- Loading branch information
1 parent
3fa346a
commit 434c47d
Showing
3 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters