-
Notifications
You must be signed in to change notification settings - Fork 2
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
e2e, reporter: Collect test artifacts #54
Open
RamLavi
wants to merge
7
commits into
kiagnose:main
Choose a base branch
from
RamLavi:reporter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
The ARTIFACTS_DIR env var will be propogated to the e2e test in later commits, where it will be used to save the test's artifacts. Signed-off-by: Ram Lavi <[email protected]>
Signed-off-by: Ram Lavi <[email protected]>
The reporter package will manage the artifacts folder, cleaning it before the test starts, and populating it with artifacts after the test ends. The CheckupReporter is exposing the parameters as public, in order to introduce more parameters in later commits. This commit introduces the package skeletin and the Cleanup method. Signed-off-by: Ram Lavi <[email protected]>
Adding the checkupReporter object to the test suite . Signed-off-by: Ram Lavi <[email protected]>
The Cleanup function will run at the start of every e2e run, in order to remove any artifact leftovers. In order to use the BeforeAll ginkgo function, changing the test container to run ordered. This has no effective meaning since the e2e test consists of only one test. Signed-off-by: Ram Lavi <[email protected]>
The artifacts that are interesting to collect are: - user configmap - job logs Signed-off-by: Ram Lavi <[email protected]>
In order to ensure that the artifacts are not removed before the collection is performed, the CollectArtifacts method is called in JustAfterEach, that is guarantieed to run before all AfterEach closures [0]. For that purposed, ginkgo's DeferCleanup functions are semantically a dynamic AfterEach functions - so the assumption still holds considering that the e2e uses DeferCleanup. [0] https://onsi.github.io/ginkgo/#cleaning-up-our-cleanup-code-defercleanup Signed-off-by: Ram Lavi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a reporter package that manages the artifacts collection after the checkup is run.
The artifacts are saved on "_output" folder which is located under the "test" folder