diff --git a/cmd/meroxa/root/apps/open_test.go b/cmd/meroxa/root/apps/open_test.go index d815d3616..42f2b83b2 100644 --- a/cmd/meroxa/root/apps/open_test.go +++ b/cmd/meroxa/root/apps/open_test.go @@ -94,7 +94,6 @@ func TestOpenAppExecution(t *testing.T) { testCases := []struct { desc string - path string appArg string appFlag string errSubstring string @@ -102,36 +101,34 @@ func TestOpenAppExecution(t *testing.T) { { desc: "Successfully open app link with arg", appArg: "app-name", - path: filepath.Join("/tmp", uuid.New().String()), }, { desc: "Successfully open app link with flag", - path: filepath.Join("/tmp", uuid.New().String()), }, { desc: "Fail with bad path", appFlag: "/tmp", - path: filepath.Join("/tmp", uuid.New().String()), errSubstring: "could not find an app.json file on path", }, } for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { os.Setenv("UNIT_TEST", "1") + path := filepath.Join("/tmp", uuid.New().String()) logger := log.NewTestLogger() cc := &Init{} - cc.Logger(log.NewTestLogger()) - cc.flags.Path = tc.path + cc.Logger(logger) + cc.flags.Path = path cc.flags.Lang = "golang" if tc.appArg != "" { cc.args.appName = tc.appArg if tc.appFlag == "" { - tc.appFlag = tc.path + "/" + tc.appArg + tc.appFlag = path + "/" + tc.appArg } } else { cc.args.appName = "my-app" if tc.appFlag == "" { - tc.appFlag = tc.path + "/my-app" + tc.appFlag = path + "/my-app" } }