Allow the E2E tests to run on clusters that have not been prepared by the Makefile#6387
Merged
jetstack-bot merged 1 commit intocert-manager:masterfrom Oct 4, 2023
Merged
Conversation
… the Makefile Signed-off-by: Richard Wall <richard.wall@venafi.com>
7323c21 to
0b7f36a
Compare
Member
Author
|
/retest |
Member
|
Looks good! |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: inteon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or 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
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.
In cert-manager/cert-manager-olm#99 I attempted to test the cert-manager OLM packages by runing
make e2e-buildto create ane2e.testbinary and I upload that to a virtual machine where I'm running an OpenShift test cluster with cert-manager installed via OperatorHub.But the tests won't run because they first deploy a Vault server where the Deployment refers to a Docker image called
local/vault:local.That image is normally pre-loaded into the cluster by the makefile, but in my case I'm running the tests on a cluster where the
make e2e-setupscript has not (and cannot) be run.This PR changes the E2E test so that it only uses the
local/vaultimage if it detects that it is being executed by make.This problem was caused by #5950 where @inteon changed the E2E tests to always install a single instance of Vault before the tests run, for performance reasons.
Previously the Vault addon would only be installed and uninstalled if the "Vault Issuer" tests were run.
So previously, I was able to compile the E2E binary and run only the "CA Issuer" tests without triggering the installation of Vault.
Testing
You see that the Vault server is using the standard Docker image
$ kubectl -n e2e-vault describe pod chart-vault-vault-0 Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 10s default-scheduler Successfully assigned e2e-vault/chart-vault-vault-0 to kind-control-plane Normal Pulling 10s kubelet Pulling image "hashicorp/vault:1.13.1"And as a result I can now run the Vault Issuer E2E tests on my personal cluster.
There is a warning due to some bug in the way we set up the logging, which can be addressed in another PR.
And there is a bug where the service account token used by one of the tests is assuming that cert-manager is installed in the cert-manager namespace, but operatorhub.io installs in an
operatorsnamespace by default.The
CA Issuertests all pass, which is the important thing for my OperatorHub package testing