-
Notifications
You must be signed in to change notification settings - Fork 349
Use Helm chart manifests in the e2e tests #366
Copy link
Copy link
Open
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.
So our e2e tests create a test cluster and install LVP using go code
sig-storage-local-static-provisioner/test/e2e/e2e_test.go
Line 296 in 8335a2a
sig-storage-local-static-provisioner/test/e2e/e2e_test.go
Line 311 in 8335a2a
And if you look at the implementation it's installing the same resources declared in the helm chart, to avoid duplicating the setup we could set up a helm go client and install the chart in
helm/provisioner/with some values defined in go code instead.I think https://manuelmazzuola.dev/2021/03/28/deploy-helm-chart-go is good starting point to use helm programatically, another way to accomplish the same is to install the helm/kubectl binaries in the script that creates the cluster that way we can call
helm debug | kubectl apply -f -from within the testThe starting point for the test runner is our Prow job in test-infra which calls
make e2e->hack/e2e.sh->sig-storage-local-static-provisioner/hack/e2e.sh
Lines 318 to 324 in e0ad13e
if you have a cluster already running make sure to update the above lines to only run the test and not create/delete a cluster, i.e. remove
--up --down