Skip to content

Commit

Permalink
remove static kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiscr committed Sep 2, 2024
1 parent b7311ad commit b954a25
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/test/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ import (
var s *Suite

func TestMain(m *testing.M) {
s = NewSuite(m, NewEnvConf("/Users/I539990/tmp/kind-kc.yaml"), WithCRDsInstalled, WithKindCluster, WithDockerBuild, WithKIMDeployed, WithExportOfClusterLogs)
s = NewSuite(m, NewEnvConf(""), WithCRDsInstalled, WithKindCluster, WithDockerBuild, WithKIMDeployed, WithExportOfClusterLogs)
s.Run()
}

func TestKCPSystem(t *testing.T) {
f := s.NewFeature(t, "Get list of kcp-system pods and check for KIM")

f.Assert("KCP-system namespace exists", func(client klient.Client) {
var ns v1.Namespace
err := client.Resources(KCPNamespace).Get(context.TODO(), "kcp-system", "", &ns)
assert.NoError(t, err)
assert.Equal(t, ns.Name, "kcp-system")
})

f.Assert("KIM Pod exists", func(client klient.Client) {
var pods v1.PodList
err := client.Resources(KCPNamespace).List(context.TODO(), &pods)
Expand All @@ -38,6 +40,11 @@ func TestKCPSystem(t *testing.T) {
func TestRuntimeCR(t *testing.T) {
f := s.NewFeature(t, "Compare Runtime CR with Shoot")
f.WithRuntimeCRs(path.Join("assets", "runtime-example.yaml"))
f.Assert("Check for the correct Shoot", func(client klient.Client) {
var ns v1.Namespace
err := client.Resources(KCPNamespace).Get(context.TODO(), "kcp-system", "", &ns)
assert.NoError(t, err)
})
f.Run()
}

Expand Down

0 comments on commit b954a25

Please sign in to comment.