Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: <carry>: e2e: Adjust OpenShift tests for easier management
* Adjust CPU test for openshift metrics window The cpu scaler test previously never worked on OpenShift, and it turns out that it's because our prometheus-adapter metrics window is set to 5 minutes (unlike the expected metrics-server default of 30s from upstream), and that means on OpenShift it takes 5 minutes for the HPA to start getting metrics before it can scale anything. So the test would run, but we'd spend so long waiting for the metrics to populate that we didn't react to the load being generated by the test and the test would fail. This adds a helper function that either waits for 10 minutes or until the HPA metrics are populated, whichever happens first, before starting the test, which makes the test function properly on OpenShift. * Pull test container dockerfile out of CI and into keda repo Previously we were building the test container in CI from a dockerfile_literal, which was kind of hacky and more difficult to manage than it being here in the keda repo. This pulls that dockerfile out of CI and into a Dockerfile.tests which we now just reference from CI. * Add Makefile targets to makefile for OpenShift tests We kind of stuffed those tests into CI quick so we had something, and when we did we didn't heavily consider ergonomics. Now that we find ourselves having to enable additional tests for fixes and new features, it will be much easier in the long run if we can manage the test targets here in the repo so we don't have to put in a separate PR to the release repo to see if our changes work. This adds some e2e-test-openshift* makefile targets that we can point and whatever we need to, and once CI is updated, it can just call those targets, whatever they happen to entail. * Reenable CPU scaler test Now that we figured out how the CPU test was broken, we can add it back in to the testing since it's supported. This adds the cpu test into the e2e-test-openshift Makefile target, so when CI calls it, it will run with the rest of the scaler tests
- Loading branch information