Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! chore: fix flake in create-admin-user test
  • Loading branch information
deansheather committed Feb 8, 2023
commit 3e46f5aaea970d834a70df4a391fc6bd251883f4
10 changes: 3 additions & 7 deletions cli/server_createadminuser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"runtime"
"testing"
"time"

"github.com/google/uuid"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -138,8 +137,7 @@ func TestServerCreateAdminUser(t *testing.T) {

// Sometimes generating SSH keys takes a really long time if there isn't
// enough entropy. We don't want the tests to fail in these cases.
//nolint:gocritic
ctx, cancel := context.WithTimeout(ctx, 1*time.Minute)
ctx, cancel := context.WithTimeout(ctx, testutil.WaitSuperLong)
defer cancel()

pty.ExpectMatchContext(ctx, "Creating user...")
Expand Down Expand Up @@ -187,8 +185,7 @@ func TestServerCreateAdminUser(t *testing.T) {

// Sometimes generating SSH keys takes a really long time if there isn't
// enough entropy. We don't want the tests to fail in these cases.
//nolint:gocritic
ctx, cancel := context.WithTimeout(ctx, 1*time.Minute)
ctx, cancel := context.WithTimeout(ctx, testutil.WaitSuperLong)
defer cancel()

pty.ExpectMatchContext(ctx, "User created successfully.")
Expand Down Expand Up @@ -241,8 +238,7 @@ func TestServerCreateAdminUser(t *testing.T) {

// Sometimes generating SSH keys takes a really long time if there isn't
// enough entropy. We don't want the tests to fail in these cases.
//nolint:gocritic
ctx, cancel := context.WithTimeout(ctx, 1*time.Minute)
ctx, cancel := context.WithTimeout(ctx, testutil.WaitSuperLong)
defer cancel()

pty.ExpectMatchContext(ctx, "User created successfully.")
Expand Down