Skip to content

Commit

Permalink
Fix flaky host user tests (#50918)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rosstimothy authored Jan 10, 2025
1 parent 5cf6e28 commit f3e5f04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration/hostuser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,8 @@ func TestRootLoginAsHostUser(t *testing.T) {
require.NoError(t, instance.StopAll())
})

instance.WaitForNodeCount(context.Background(), helpers.Site, 1)

tests := []struct {
name string
command []string
Expand Down Expand Up @@ -750,6 +752,8 @@ func TestRootStaticHostUsers(t *testing.T) {
_, err = instance.StartNode(nodeCfg)
require.NoError(t, err)

instance.WaitForNodeCount(context.Background(), helpers.Site, 2)

// Create host user resources.
groups := []string{"foo", "bar"}
goodLogin := utils.GenerateLocalUsername(t)
Expand Down

0 comments on commit f3e5f04

Please sign in to comment.