-
Notifications
You must be signed in to change notification settings - Fork 13
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
Run VSphere tests in self-hosted, refactor test suite into spec per provider, support label filtering, get all tests green #360
base: main
Are you sure you want to change the base?
Conversation
dc5f8d2
to
605513d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
92cc4f5
to
d4f0344
Compare
d4f0344
to
fea83d7
Compare
f76cfe0
to
e19f75f
Compare
7560f52
to
00088a6
Compare
|
dc6d505
to
6386214
Compare
6c6fc9f
to
25aef1d
Compare
Note: This run shows a vsphere green: https://github.com/Mirantis/hmc/actions/runs/11153080327/job/31036965900?pr=360 We might see some failures in upcoming runs as Mirantis IT is doing some work on our self-hosted runner. |
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.
Looks good just wonder about leaving tmate in there
4e915c7
to
672d5f2
Compare
csi-drivers are going to be the death of me 😂 |
f6cb0da
to
a65544d
Compare
The
Deleting the machine triggers the
From the CAPI code it appears were here ^^ but there's no log statements or events pertaining to not being able to find the Checking the code, it iterates the
|
a65544d
to
86dc992
Compare
* Break provider tests into seperate files with labels representing either onprem or cloud providers. * Add new jobs to CI workflow which dictate where tests will run, onprem provider tests like vSphere will run on self-hosted runners since they will use internal resources to test. Cloud provider tests will use the existing workflow since they can access providers without network access and can take advantage of the much larger GitHub hosted pool. Hosted/Self-hosted tests can run concurrently. * Make Cleanup depend on the cloud-e2etest only. * Use new GINKGO_LABEL_FILTER to manage what tests run where. * Move controller validatation into BeforeSuite since the controller needs to be up and ready for each provider test, this will also enable us to add controller specific test cases later and make those run without the "test e2e" flag. * Seperate self-hosted and hosted test concurrency groups * Update docs with test filtering instructions * Ensure a Release exists for the custom build.version we deploy * Move all e2e related helpers into e2e dir * Add new clusteridentity package for creating ClusterIdentity kind's and associated Secret's. * Merge PR workflows together * Make sure VERSION gets passed across jobs * Ensure uniqueness among deployed ManagedClusters, simplify MANAGED_CLUSTER_NAME in CI to prevent Azure availabilitySetName validation error. * Default Azure test templates to uswest2 to prevent issues with AvailabilityZone. * Use the same concurrency-group across all jobs, except Cleanup which intentionally does not belong to a concurrency-group. * Use Setup Go across jobs for caching. * Support patching other hosted clusters to status.ready with a common patching helper. * Move VSphere delete into AfterEach to serve as cleanup. * Add support for cleaning Azure resources. * Prevent ginkgo from timing out tests. * Use azure-disk CSI driver we deploy via templates. Signed-off-by: Kyle Squizzato <ksquizzato@mirantis.com>
86dc992
to
3a4c09c
Compare
This PR refactors our existing e2e test spec into a more conventional e2e test run. We now have a
BeforeSuite
that runs and installs/validates the controller. Prior to this we had all of our e2e tests under a singleController
spec, but this breaks it into:Label(controller)
)Label(provider)
)Label(provider:aws, provider:cloud)
) -test/e2e/provider_aws_test.go
Label(provider:azure, provider:cloud)
) -test/e2e/provider_azure_test.go
Label(provider:vsphere, provider:onprem)
) -test/e2e/provider_vsphere_test.go
The labels for these tests have been documented here: https://github.com/Mirantis/hmc/pull/360/files#diff-3a6cab76ecce19612a704fe0ef89dc83f1ed2df44f7bfa28d47d2529a7949fafR139
Each of the umbrella labels correspond to a GitHub job that is dependent on the
Build and Unit Test
job which provides setup. TheController
tests always run, no matter the label, right now theController
test is disabled because there aren't any tests other than Before/AfterSuite, but we can enable it because that sort of is a test of the controller in itself.The provider tests are still attached to the
test e2e
label, but I think we can break these out further withprovider
specific GitHub labels at some point.provider:onprem
tests run on a self-hosted GitHub runner that has access to Mirantis' network, this is to support providers that do not necessarily have cloud infrastructure we can get to from a GitHub hosted runner -- like VSphere.This PR also adds support for creating
ClusterIdentity
,Credential
and their associatedSecret
resources with a newclusteridentity
package.And of course, with testing comes bug fixing, so this PR fixes several different issues discovered along the way.
Closes: #210, Closes: #323
Note: I've opened two other issues to further simplify these tests, we could make these a lot easier to write in the future with: