From 65fd3fdb4b7883410f26e82f1a7986aa7fa2a23d Mon Sep 17 00:00:00 2001 From: mitchell Date: Wed, 2 Oct 2024 10:15:11 -0400 Subject: [PATCH] Use a dummy port for integration test. An empty port uses :80 by default, which requires admin privileges or something. --- internal/scriptrun/test/integration/scriptrun_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/scriptrun/test/integration/scriptrun_test.go b/internal/scriptrun/test/integration/scriptrun_test.go index 506a7da279..0152e2b7ef 100644 --- a/internal/scriptrun/test/integration/scriptrun_test.go +++ b/internal/scriptrun/test/integration/scriptrun_test.go @@ -120,7 +120,8 @@ func (suite *ScriptRunSuite) TestEnvIsSet() { cfg.Set(constants.AsyncRuntimeConfig, true) out := capturer.CaptureOutput(func() { - scriptRun := scriptrun.New(primer.New(auth, outputhelper.NewCatcher(), subshell.New(cfg), proj, cfg, blackhole.New(), model.NewSvcModel(""))) + port := ":12345" // pick a high number that doesn't require admin privileges + scriptRun := scriptrun.New(primer.New(auth, outputhelper.NewCatcher(), subshell.New(cfg), proj, cfg, blackhole.New(), model.NewSvcModel(port))) script, err := proj.ScriptByName("run") require.NoError(t, err, "Error: "+errs.JoinMessage(err)) err = scriptRun.Run(script, nil)