diff --git a/windows-agent/cmd/ubuntu-pro-agent/main.go b/windows-agent/cmd/ubuntu-pro-agent/main.go index bd7bb5508..0cef47bc5 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/wsl-pro-service/cmd/wsl-pro-service/main.go b/wsl-pro-service/cmd/wsl-pro-service/main.go index 6dea1c079..83014838b 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,