-
Notifications
You must be signed in to change notification settings - Fork 25
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
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
|
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.
Some minor notes here and there.
I don't have major concerns regarding actual tests, apart from the fact that standalone and hosted CP tests are squashed together.
I understand the reason for that, since we're reusing standalone cluster and it must be created anyway for hosted CP tests, but I see the following cons of this approach:
- standalone and hosted tests can't be run separately
- If hosted CP fails (and it will a lot I'm sure) it will fail the whole AWS test, which makes it slightly harder to interpret the test.
I know that it's e2e tests and we should run the whole suite, but I believe it makes sense to run only on the release or ad-hoc. Most changes could be tested by simply running tests on standalone cluster.
I will not block this PR because of that, but I a task for the future us would be nice.
templates/cluster/vsphere-standalone-cp/templates/k0scontrolplane.yaml
Outdated
Show resolved
Hide resolved
templates/cluster/vsphere-standalone-cp/templates/k0scontrolplane.yaml
Outdated
Show resolved
Hide resolved
80fc91c
to
9c6a1b4
Compare
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.
Minor notes
9c6a1b4
to
4ee982a
Compare
9630f10
to
803e93c
Compare
803e93c
to
eb66984
Compare
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.
LGTM
PR needs rebasing
* 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 <[email protected]>
Signed-off-by: Kyle Squizzato <[email protected]>
Signed-off-by: Kyle Squizzato <[email protected]>
Signed-off-by: Kyle Squizzato <[email protected]>
eb66984
to
24603f7
Compare
@a13x5 rebased |
Will be merging w/ admin rights to bypass the checks Job will not run on this patch because of @squizzi will make a follow-up after this PR merge to ensure no issues are present. |
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: