Skip to content

Commit 8c1986a

Browse files
committed
fix failing test.
1 parent 393ecd6 commit 8c1986a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

controllers/controllers_suite_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ var _ = BeforeSuite(func() {
9393
}).SetupWithManager(ctx, testEnv.Manager, controller.Options{})).To(Succeed())
9494

9595
Expect((&HetznerBareMetalHostReconciler{
96-
Client: testEnv.Manager.GetClient(),
97-
APIReader: testEnv.Manager.GetAPIReader(),
98-
RobotClientFactory: testEnv.RobotClientFactory,
99-
SSHClientFactory: testEnv.BaremetalSSHClientFactory,
100-
PreProvisionCommand: "dummy-pre-provision-command",
96+
Client: testEnv.Manager.GetClient(),
97+
APIReader: testEnv.Manager.GetAPIReader(),
98+
RobotClientFactory: testEnv.RobotClientFactory,
99+
SSHClientFactory: testEnv.BaremetalSSHClientFactory,
100+
PreProvisionCommand: "dummy-pre-provision-command",
101+
SSHAfterInstallImage: true,
101102
}).SetupWithManager(ctx, testEnv.Manager, controller.Options{})).To(Succeed())
102103

103104
Expect((&HetznerBareMetalMachineReconciler{

controllers/hetznerbaremetalmachine_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ var _ = Describe("HetznerBareMetalMachineReconciler", func() {
429429
return isPresentAndTrue(key, bmMachine, infrav1.HostReadyCondition)
430430
}, timeout).Should(BeTrue())
431431

432+
osSSHClient.On("GetHostName").Unset()
433+
432434
osSSHClient.On("GetHostName").Return(sshclient.Output{
433435
StdOut: "some-unexpected-hostname",
434436
StdErr: "",

0 commit comments

Comments
 (0)