Skip to content

Commit

Permalink
Added basic integration test
Browse files Browse the repository at this point in the history
This test will only create a cluster and collect logs from it.
  • Loading branch information
huutomerkki committed Jul 21, 2023
1 parent f4eedc0 commit f45db7d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/e2e/basic_integration_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package e2e

import (
"os"
"path/filepath"
"strings"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

var _ = Describe("When testing basic integration [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")
numberOfWorkers = int(*e2eConfig.GetInt32PtrVariable("WORKER_MACHINE_COUNT"))
numberOfControlplane = int(*e2eConfig.GetInt32PtrVariable("CONTROL_PLANE_MACHINE_COUNT"))
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)
})
})

0 comments on commit f45db7d

Please sign in to comment.