-
Notifications
You must be signed in to change notification settings - Fork 68
Add basis for future automated functional/regression tests of project-clone container #1124
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
Add basis for future automated functional/regression tests of project-clone container #1124
Conversation
/retest |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #1124 +/- ##
==========================================
- Coverage 51.93% 51.90% -0.03%
==========================================
Files 80 80
Lines 7356 7356
==========================================
- Hits 3820 3818 -2
- Misses 3248 3249 +1
- Partials 288 289 +1 ☔ View full report in Codecov by Sentry. |
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.
Awesome work @amisevsk 👍
Tested how things look like when the test case succeeds & when there's a failure (I used a fake git repo URL for the fork_repo
URL variable to cause the test to fail).
5949014
to
1ce8a77
Compare
Accidentally forgot to push the |
echo "Project is on $branch_name, tracking $tracking_branch, with remotes configured" | ||
|
||
echo "Test succeeded. Sleeping indefinitely" | ||
tail -f /dev/null No newline at end of file |
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.
I think this is missing a newline? But looks good to me otherwise
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amisevsk, AObuchow The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add devworkspace project-clone/test/project-clone-test.devworkspace.yaml to allow for semi-automatic testing of the project-clone container. This workspace is set up to run a bash script (stored in the .command field) on start that verifies that projects have been set up as expected. If projects were not set up correctly, the workspace enters a failed state and logs for the workspace container can be checked for the cause of the failure. The workspace makes use of devfile variables to enable configuration of the key elements being tested (main repo, fork repo, branch, tag, revision) Signed-off-by: Angel Misevski <amisevsk@redhat.com>
1ce8a77
to
a29da43
Compare
New changes are detected. LGTM label has been removed. |
What does this PR do?
In verifying PR #1115, I worked on a semi-automatic regression test for project-clone functionality to ensure the PR wasn't breaking existing behavior. I figured it's worth adding this to the repository so that it's not lost to time.
This PR adds sample DevWorkspaces to
project-clone/test/
that tests project clone functionality at a basic level: they verify that projects can be cloned, and that branches, tags, and revisions can be correctly checked out from both the origin and a fork of the repository. If any project is not set up as expected, the workspace enters a failed state (potentially after a few restarts), indicating that there is a problem. If the "test" "succeeds", the workspace enters and stays in a running state. Logs for a successful test look likeThe workspace makes use of devfile variables to enable configuration of the key elements being tested (main repo, fork repo, branch, tag, revision) so that it can more easily be adapted in the future (though it is harder to read as a result)
The
project-clone-test-basic.devworkspace.yaml
file is a simpler, more basic test of the functionality above -- it just verifies that we can successfully clone a project from a repository. It was useful for testing that #1114 was resolved (where the self-signed certificates repo I used to test did not have a fork, branches, tags, etc.)What issues does this PR fix or reference?
N/A
Is it tested? How?
Tests can be run by applying these DevWorkspaces to any cluster where DWO is installed.
PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che