-
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.
add log validation to integration tests
What is the problem being solved? This pr addresses #119 which explains that the integration tests should support viewing the logs for a Build containers invocation. Why is this the best approach? The solution to get the logs for Builds in this pr relies on using PersistentVolume's. A volume is mounted into the test Build, the BuildSpec container writes to the mounted volume, and then a verfication pod is run that also mounts this Persistent volume at which point the Build logs for the init container that Build spawned are now verifiable. What other approaches did you consider? - Use Stackdriver logs Issues: - Stackdriver can take >30 minutes to propogate logs in some cases so it is not feasible for integration test - Stackdriver use would limit integration tests to only work on clusters with Stackdriver integration What side effects will this approach have? This test will require that all test Tasks that are verifiable only through stdout/logging have to write to disk as that is how we can read out the values for verfification. What future work remains to be done The approach of storing test information in a PersistentVolume is required currently as Kubernetes pod logs are not queryable in some cases one a pod succeeds. If in the future kubernetes better supports these logs natively, we can change this to use the native logging again. Also this should be refactored into an easier to use libray for future tests.
- Loading branch information
1 parent
f26a80f
commit 319e1b4
Showing
4 changed files
with
153 additions
and
11 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
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