diff --git a/scripts/environment.sh b/scripts/environment.sh index 1f388e7b7c..2613819ba5 100644 --- a/scripts/environment.sh +++ b/scripts/environment.sh @@ -65,7 +65,7 @@ if [[ ${GINKGO_FOCUS:-} == "clusterctl-upgrade" ]]; then fi # Integration test environment vars and config -if [[ ${GINKGO_FOCUS:-} == "integration" ]]; then +if [[ ${GINKGO_FOCUS:-} == "integration" || ${GINKGO_FOCUS:-} == "basic" ]]; then export NUM_NODES=${NUM_NODES:-"2"} export CONTROL_PLANE_MACHINE_COUNT=${CONTROL_PLANE_MACHINE_COUNT:-"1"} export WORKER_MACHINE_COUNT=${WORKER_MACHINE_COUNT:-"1"} diff --git a/test/e2e/basic_integration_test.go b/test/e2e/basic_integration_test.go new file mode 100644 index 0000000000..29f6ecae71 --- /dev/null +++ b/test/e2e/basic_integration_test.go @@ -0,0 +1,32 @@ +package e2e + +import ( + "os" + "path/filepath" + "strings" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("When testing basic cluster creation [basic]", func() { + BeforeEach(func() { + osType := strings.ToLower(os.Getenv("OS")) + Expect(osType).ToNot(Equal("")) + validateGlobals(specName) + + // We need to override clusterctl apply log folder to avoid getting our credentials exposed. + clusterctlLogFolder = filepath.Join(os.TempDir(), "clusters", bootstrapClusterProxy.GetName()) + }) + + It("Should create a workload cluster", func() { + By("Fetching cluster configuration") + k8sVersion := e2eConfig.GetVariable("KUBERNETES_VERSION") + By("Provision Workload cluster") + targetCluster, _ = createTargetCluster(k8sVersion) + }) + + AfterEach(func() { + DumpSpecResourcesAndCleanup(ctx, specName, bootstrapClusterProxy, artifactFolder, namespace, e2eConfig.GetIntervals, clusterName, clusterctlLogFolder, skipCleanup) + }) +})