diff --git a/windows-agent/cmd/ubuntu-pro-agent/main.go b/windows-agent/cmd/ubuntu-pro-agent/main.go index 4dd6a0b7c..343fbc60f 100644 --- a/windows-agent/cmd/ubuntu-pro-agent/main.go +++ b/windows-agent/cmd/ubuntu-pro-agent/main.go @@ -19,6 +19,7 @@ import ( //go:generate go run ../generate_completion_documentation.go update-doc-cli-ref func main() { + i18n.InitI18nDomain(common.TEXTDOMAIN) a := agent.New() os.Exit(run(a)) } @@ -30,7 +31,6 @@ type app interface { } func run(a app) int { - i18n.InitI18nDomain(common.TEXTDOMAIN) defer installSignalHandler(a)() log.SetFormatter(&log.TextFormatter{ diff --git a/windows-agent/cmd/ubuntu-pro-agent/main_test.go b/windows-agent/cmd/ubuntu-pro-agent/main_test.go index 9b3baa17a..91a8bcd7f 100644 --- a/windows-agent/cmd/ubuntu-pro-agent/main_test.go +++ b/windows-agent/cmd/ubuntu-pro-agent/main_test.go @@ -32,6 +32,8 @@ func (a *myApp) Quit() { } func TestRun(t *testing.T) { + t.Parallel() + tests := map[string]struct { runError bool usageErrorReturn bool @@ -46,6 +48,8 @@ func TestRun(t *testing.T) { for name, tc := range tests { tc := tc t.Run(name, func(t *testing.T) { + t.Parallel() + a := myApp{ done: make(chan struct{}), runError: tc.runError, diff --git a/wsl-pro-service/cmd/wsl-pro-service/main.go b/wsl-pro-service/cmd/wsl-pro-service/main.go index ce163f68c..80e43e4b2 100644 --- a/wsl-pro-service/cmd/wsl-pro-service/main.go +++ b/wsl-pro-service/cmd/wsl-pro-service/main.go @@ -19,6 +19,7 @@ import ( //go:generate go run ../generate_completion_documentation.go update-doc-cli-ref func main() { + i18n.InitI18nDomain(common.TEXTDOMAIN) a := service.New() os.Exit(run(a)) } @@ -30,7 +31,6 @@ type app interface { } func run(a app) int { - i18n.InitI18nDomain(common.TEXTDOMAIN) defer installSignalHandler(a)() log.SetFormatter(&log.TextFormatter{ diff --git a/wsl-pro-service/cmd/wsl-pro-service/main_test.go b/wsl-pro-service/cmd/wsl-pro-service/main_test.go index a2aa2db06..9dd8034c3 100644 --- a/wsl-pro-service/cmd/wsl-pro-service/main_test.go +++ b/wsl-pro-service/cmd/wsl-pro-service/main_test.go @@ -64,6 +64,8 @@ func TestRunSignal(t *testing.T) { } func TestRun(t *testing.T) { + t.Parallel() + tests := map[string]struct { runError bool usageErrorReturn bool @@ -78,6 +80,8 @@ func TestRun(t *testing.T) { for name, tc := range tests { tc := tc t.Run(name, func(t *testing.T) { + t.Parallel() + a := myApp{ done: make(chan struct{}), runError: tc.runError,