Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Jun 23, 2022
1 parent 921e002 commit 74b5ec0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/controllers/topology/cluster/reconcile_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package cluster
import (
"fmt"
"net/http"
"os"
"regexp"
"testing"
"time"
Expand Down Expand Up @@ -46,6 +47,7 @@ import (
fakeruntimeclient "sigs.k8s.io/cluster-api/internal/runtime/client/fake"
"sigs.k8s.io/cluster-api/internal/test/builder"
. "sigs.k8s.io/cluster-api/internal/test/matchers"
"sigs.k8s.io/cluster-api/util/kubeconfig"
)

var (
Expand Down Expand Up @@ -1588,7 +1590,7 @@ func TestReconcileMachineDeployments(t *testing.T) {
g := NewWithT(t)

// Write the config file to access the test env for debugging.
// g.Expect(os.WriteFile("test.conf", kubeconfig.FromEnvTestConfig(env.Config, &clusterv1.Cluster{
// g.Expect(os.WriteFile("/tmp/test.conf", kubeconfig.FromEnvTestConfig(env.Config, &clusterv1.Cluster{
// ObjectMeta: metav1.ObjectMeta{Name: "test"},
// }), 0777)).To(Succeed())

Expand Down Expand Up @@ -1660,7 +1662,7 @@ func TestReconcileMachineDeployments(t *testing.T) {
md8Update := newFakeMachineDeploymentTopologyState("md-8-update", infrastructureMachineTemplate8Update, bootstrapTemplate8Update, nil)
infrastructureMachineTemplate8UpdateWithChanges := infrastructureMachineTemplate8Update.DeepCopy()
g.Expect(unstructured.SetNestedField(infrastructureMachineTemplate8UpdateWithChanges.Object, "foo", "spec", "template", "spec", "foo")).To(Succeed())
bootstrapTemplate8UpdateWithChanges := bootstrapTemplate3.DeepCopy()
bootstrapTemplate8UpdateWithChanges := bootstrapTemplate8Update.DeepCopy()
g.Expect(unstructured.SetNestedField(bootstrapTemplate8UpdateWithChanges.Object, "foo", "spec", "template", "spec", "foo")).To(Succeed())
md8UpdateWithRotatedTemplates := newFakeMachineDeploymentTopologyState("md-8-update", infrastructureMachineTemplate8UpdateWithChanges, bootstrapTemplate8UpdateWithChanges, nil)

Expand Down

0 comments on commit 74b5ec0

Please sign in to comment.