diff --git a/tool/tsh/common/app_azure_test.go b/tool/tsh/common/app_azure_test.go index de0b373db2fe7..59178777926d5 100644 --- a/tool/tsh/common/app_azure_test.go +++ b/tool/tsh/common/app_azure_test.go @@ -213,6 +213,8 @@ func makeUserWithAzureRole(t *testing.T) (types.User, types.Role) { } func Test_getAzureIdentityFromFlags(t *testing.T) { + t.Parallel() + tests := []struct { name string requestedIdentity string @@ -441,6 +443,8 @@ func Test_getMSISecret(t *testing.T) { } func Test_formatAzureIdentities(t *testing.T) { + t.Parallel() + tests := []struct { name string identities []string diff --git a/tool/tsh/common/app_cloud_test.go b/tool/tsh/common/app_cloud_test.go index e5bd08cade179..9094163440c0c 100644 --- a/tool/tsh/common/app_cloud_test.go +++ b/tool/tsh/common/app_cloud_test.go @@ -23,6 +23,8 @@ import ( ) func Test_filterApps(t *testing.T) { + t.Parallel() + tests := []struct { name string matchRouteToApp func(tlsca.RouteToApp) bool diff --git a/tool/tsh/common/app_gcp_test.go b/tool/tsh/common/app_gcp_test.go index aaf0edf3d107c..359f7bac74154 100644 --- a/tool/tsh/common/app_gcp_test.go +++ b/tool/tsh/common/app_gcp_test.go @@ -27,6 +27,8 @@ import ( ) func Test_getGCPServiceAccountFromFlags(t *testing.T) { + t.Parallel() + tests := []struct { name string requestedServiceAccount string @@ -139,6 +141,8 @@ func Test_getGCPServiceAccountFromFlags(t *testing.T) { } func Test_formatGCPServiceAccounts(t *testing.T) { + t.Parallel() + tests := []struct { name string accounts []string diff --git a/tool/tsh/common/db_test.go b/tool/tsh/common/db_test.go index 218d99ed6dd72..81f4a4268083b 100644 --- a/tool/tsh/common/db_test.go +++ b/tool/tsh/common/db_test.go @@ -391,6 +391,8 @@ func TestListDatabase(t *testing.T) { } func TestFormatDatabaseListCommand(t *testing.T) { + t.Parallel() + t.Run("default", func(t *testing.T) { require.Equal(t, "tsh db ls", formatDatabaseListCommand("")) }) @@ -401,6 +403,8 @@ func TestFormatDatabaseListCommand(t *testing.T) { } func TestFormatConfigCommand(t *testing.T) { + t.Parallel() + db := tlsca.RouteToDatabase{ ServiceName: "example-db", } @@ -415,6 +419,8 @@ func TestFormatConfigCommand(t *testing.T) { } func TestDBInfoHasChanged(t *testing.T) { + t.Parallel() + tests := []struct { name string databaseUserName string diff --git a/tool/tsh/common/recording_export_test.go b/tool/tsh/common/recording_export_test.go index 50dbc5cceb66f..f86683aacf0cb 100644 --- a/tool/tsh/common/recording_export_test.go +++ b/tool/tsh/common/recording_export_test.go @@ -45,6 +45,8 @@ func init() { } func TestWriteMovieCanBeCanceled(t *testing.T) { + t.Parallel() + events := []apievents.AuditEvent{ &apievents.WindowsDesktopSessionStart{}, } @@ -53,18 +55,20 @@ func TestWriteMovieCanBeCanceled(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) cancel() - frames, err := writeMovie(ctx, fs, session.ID("test"), "test.avi") + frames, err := writeMovie(ctx, fs, "test", "test.avi") require.Equal(t, context.Canceled, err) require.Equal(t, 0, frames) } func TestWriteMovieDoesNotSupportSSH(t *testing.T) { + t.Parallel() + events := []apievents.AuditEvent{ &apievents.SessionStart{}, } fs := eventstest.NewFakeStreamer(events, 0) - frames, err := writeMovie(context.Background(), fs, session.ID("test"), "test.avi") + frames, err := writeMovie(context.Background(), fs, "test", "test.avi") require.True(t, trace.IsBadParameter(err), "expected bad paramater error, got %v", err) require.Equal(t, 0, frames) } @@ -75,6 +79,8 @@ func TestWriteMovieDoesNotSupportSSH(t *testing.T) { // At the time of this implementation, desktop access does not support resizing during the // screen during a session. This test exists to prevent regressions should that behavior change. func TestWriteMovieMultipleScreenSpecs(t *testing.T) { + t.Parallel() + events := []apievents.AuditEvent{ tdpEvent(t, tdp.ClientScreenSpec{Width: 1920, Height: 1080}), tdpEvent(t, tdp.ClientScreenSpec{Width: 1920, Height: 1080}), @@ -88,6 +94,8 @@ func TestWriteMovieMultipleScreenSpecs(t *testing.T) { } func TestWriteMovieWritesOneFrame(t *testing.T) { + t.Parallel() + oneFrame := frameDelayMillis // need a PNG that will actually decode events := []apievents.AuditEvent{ @@ -103,6 +111,8 @@ func TestWriteMovieWritesOneFrame(t *testing.T) { } func TestWriteMovieWritesManyFrames(t *testing.T) { + t.Parallel() + events := []apievents.AuditEvent{ tdpEventMillis(t, tdp.ClientScreenSpec{Width: 128, Height: 128}, 0), tdpEventMillis(t, tdp.PNG2Frame(pngFrame), 0), diff --git a/tool/tsh/common/tshconfig_test.go b/tool/tsh/common/tshconfig_test.go index 63077ed00a550..36dc403095d94 100644 --- a/tool/tsh/common/tshconfig_test.go +++ b/tool/tsh/common/tshconfig_test.go @@ -111,6 +111,8 @@ func TestLoadAllConfigs(t *testing.T) { } func TestTshConfigMerge(t *testing.T) { + t.Parallel() + sampleConfig := TshConfig{ ExtraHeaders: []ExtraProxyHeaders{{ Proxy: "foo", @@ -254,6 +256,8 @@ func TestTshConfigMerge(t *testing.T) { // TestProxyTemplatesApply verifies proxy templates matching functionality. func TestProxyTemplatesApply(t *testing.T) { + t.Parallel() + tshConfig := TshConfig{ ProxyTemplates: ProxyTemplates{ { @@ -331,6 +335,8 @@ func TestProxyTemplatesApply(t *testing.T) { // TestProxyTemplates verifies proxy templates apply properly to client config. func TestProxyTemplatesMakeClient(t *testing.T) { + t.Parallel() + tshConfig := TshConfig{ ProxyTemplates: ProxyTemplates{ {