Resolves "Update Scripted Test to Remove Dependency on Cypress Created UI Tests" | SKIP UPDATE
General MR
Summary
Per #233 (closed),
Previously this package's helm tests for Cypress created objects that became dependencies for this package's bash-based helm tests. This MR fixes that.
- rewrites
./chart/tests/scripts/test.sh
to not depend on objects created by the Cypress tests- leverages @jimmy.bourque's newly created
devops-tester
image to create its own admin token forcurl
-based testing- uses
kubectl
andjq
for that. - uses
skopeo
for container image operations instead ofcrane
because the pipelines team is moving away fromcrane
.
- uses
-
test.sh
cleans up after itself when complete: deletes new gitlab project and its images, deactivates its newly created temporaryroot
token.
- leverages @jimmy.bourque's newly created
- Rewrites the Cypress tests to delete the gitlab objects they created, meaning the
test.sh
tests can't depend on them anymore. - Chart preloads a paired
gitlab-test-pod-exec
Role
andRoleBinding
to enable thetest.sh
script tokubectl exec
.-
test.sh
removes thegitlab-test-pod-exec
Role
viakubectl delete
at the end of the test. It can't delete both theRole
and theRoleBinding
because both of them have to exist in order to issue a delete command for either one. I chose to leave theRoleBinding
in place and remove theRole
. - n.b. this currently has to bind to the built-in account
system:serviceaccount:gitlab:default
, while it should probably be binding to a gluon-specific namedServiceAccount
. I've submitted an issue at gluon#40 to propose that as an option.
-
Relevant logs/screenshots
Tests passing in CI as desired!
Test log: https://repo1.dso.mil/big-bang/product/packages/gitlab/-/jobs/36286161
Linked Issue
- Closes gitlab#233
- Supersedes !281 (closed)
Upgrade Notices
N/A
Edited by Daniel Pritchett