* Continual tests logging within test scope
* Make ThreadSafeBuffer unexported
* logBuffer private on BackgroundContext
* log the buffer in Setup phase on success as well
* Use AddCaller and Development for actual (non-test) logging
* Highlight background logs
* Initial newline for background logs
* Remove space before Background log end
* Style
* Pass LogConfig instead of Log
* Introduce new typ Configuration.LogConfig that is accepted by the Execute function. This
type holds the zap logger configuration and a custom build function for producing
the resulting logger.
* The zap Config can be reused to produce the internal logger for background tests. This
way the background logger can share most configuration with the main framework logger.
* Keep the Configuration.Log variable for backwards compatibility reasons. It's used when
no Configuration.LogConfig is defined.
* Modify tests to use a background test logger in Continual/Background tests
so that we can verify those tests are executed correctly.
* Review changes
* Wrapping logs back to testing.T
* Write background logs before AND after Verify phase
* To prevent losing background logs when the Verify phase calls t.Fail
or t.Skip
* Use InMemoryLogger in setup phase as well
* that's where the logger is passed to tests and its background
operations (e.g. prober)
* Verify background logs for skipped test
* Add TestFailAtBackgroundVerification and rename the test file
* the file now includes more tests for the background verification
phase, not just "skip"
* Simplify verifyBackgroundLogs and remove redundant suffix for logs
* Better zap Config default value
* Override output paths if set to default value
* Do not pass zap.Config by reference
* Trigger checks
Co-authored-by: Chris Suszyński <ksuszyns@redhat.com>
* Tidy helper to avoid need for nosec comment
Currently we fmt.Sprintf a command string only to immediately split it
back in to args, which causes gosec to complain about unsanitised inputs
to exec.Command. Refactoring this to directly pass an args array is
clearer, more secure, and avoids needing the nosec comment.
* Drop helper method
This patch changes `DefaultErrorRetryChecker` to `ErrorRetryChecker`
type before adding in the interface array.
Without it, the type of DefaultErrorRetryChecker is still `func(error) (bool, error)`.
* Use consistent case for "Deprecated" comments
Not the most important thing ever, but the canonical string to use for
Deprecated warnings is case sensitive, and also it's nice to be
consistent.
* Add nolint comment
* support multiple cleanup functions
* comment on the expected order
* add boilerplate
* poll while we wait for the test subprocess to setup
* use a tmp file to sychronize the two test processes
this should avoid the data race of reading the subprocess's stdout
* don't make this a breaking change
* fix lint issues
* consolidate k8s flags to an environment package
* add copyright
* fix comment style
* use go1.16 in workflows so downstream tests work
* Deprecate GetRESTConfig and do not remove
* update copyright date
* feat/perf-test: continue test when fail to get commit id
changeset.Get does not work well when the test image is in the
vendor directory because there is no kodata setup. After this
commit, failure to get the commit id will result in a
log entry instead of failing the whole test.
* Update test/mako/sidecar.go
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>