m/test/e2e: split core/kubernetes tests, clean up
This splits the large TestE2E function into two separate functions and
tests: one which exercises the core functionality of Kubernetes, the
other which exercises just the Kubernetes bits.
This allows for easier testing during development, and generally trades
off higher resources usage for faster execution time in CI.
At the same time we do some small cleanups of the E2E functionality:
1. Node startup is now parallelized.
2. Non-bootstrap nodes can now be left in NEW (this was used in
diagnosing issue #234, but it currently unused in the main code).
3. Kubernetes access now goes over SOCKS.
4. Some Cluster helper functions have been added.
All in all this should allow us writing more E2E tests in the future,
and at some point also maybe turn Cluster into an interface that is
implemented both by the current framework but also some persistent tests
running against long-term VMs/physical machines.
Change-Id: Ia4586b2aaa5fc8c979d35f4b49513638481e4c10
Reviewed-on: https://review.monogon.dev/c/monogon/+/1870
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/test/e2e/k8s_cts/main.go b/metropolis/test/e2e/k8s_cts/main.go
index c0adc75..4b86b64 100644
--- a/metropolis/test/e2e/k8s_cts/main.go
+++ b/metropolis/test/e2e/k8s_cts/main.go
@@ -33,8 +33,6 @@
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- common "source.monogon.dev/metropolis/node"
- "source.monogon.dev/metropolis/test/e2e"
"source.monogon.dev/metropolis/test/launch/cluster"
)
@@ -106,8 +104,7 @@
log.Fatalf("Failed to launch cluster: %v", err)
}
log.Println("Cluster initialized")
- // TODO(q3k): use SOCKS proxy instead.
- clientSet, err := e2e.GetKubeClientSet(cl, cl.Ports[uint16(common.KubernetesAPIWrappedPort)])
+ clientSet, err := cl.GetKubeClientSet()
if err != nil {
log.Fatalf("Failed to get clientSet: %v", err)
}