Skip to content

Commit cca5711

Browse files
authored
Fix flaky host user tests (#50919)
Applies the same fixes as #49850 to ensure that the tests wait until the target host is routable before attempting to create any SSH sessions. Closes #50910
1 parent 8a84b09 commit cca5711

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

integration/hostuser_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,8 @@ func TestRootLoginAsHostUser(t *testing.T) {
667667
require.NoError(t, instance.StopAll())
668668
})
669669

670+
instance.WaitForNodeCount(context.Background(), helpers.Site, 1)
671+
670672
tests := []struct {
671673
name string
672674
command []string
@@ -750,6 +752,8 @@ func TestRootStaticHostUsers(t *testing.T) {
750752
_, err = instance.StartNode(nodeCfg)
751753
require.NoError(t, err)
752754

755+
instance.WaitForNodeCount(context.Background(), helpers.Site, 2)
756+
753757
// Create host user resources.
754758
groups := []string{"foo", "bar"}
755759
goodLogin := utils.GenerateLocalUsername(t)

0 commit comments

Comments
 (0)