Skip to content

Commit

Permalink
Merge branch version/0-47-0-RC1 to adopt changes from PR #3506
Browse files Browse the repository at this point in the history
  • Loading branch information
as-builds committed Sep 24, 2024
2 parents 2f0e644 + 1d79eb6 commit 9172459
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/scriptrun/test/integration/scriptrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/ActiveState/cli/internal/testhelpers/osutil"
"github.com/ActiveState/cli/internal/testhelpers/outputhelper"
"github.com/ActiveState/cli/pkg/platform/authentication"
"github.com/ActiveState/cli/pkg/platform/model"
"github.com/ActiveState/cli/pkg/project"
"github.com/ActiveState/cli/pkg/projectfile"
)
Expand Down Expand Up @@ -119,7 +120,7 @@ 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()))
scriptRun := scriptrun.New(primer.New(auth, outputhelper.NewCatcher(), subshell.New(cfg), proj, cfg, blackhole.New(), model.NewSvcModel("")))
script, err := proj.ScriptByName("run")
require.NoError(t, err, "Error: "+errs.JoinMessage(err))
err = scriptRun.Run(script, nil)
Expand Down Expand Up @@ -353,6 +354,7 @@ project: "https://platform.activestate.com/ActiveState/project"
scripts:
- name: %s
standalone: true
language: batch
value: |
echo "ARGS|%%1|%%2|%%3|%%4|"`, cmdName)
}
Expand All @@ -363,15 +365,12 @@ scripts:
}

func captureExecCommand(t *testing.T, tmplCmdName, cmdName string, cmdArgs []string) (string, error) {

auth, err := authentication.LegacyGet()
require.NoError(t, err)

pjfile := setupProjectWithScriptsExpectingArgs(t, tmplCmdName)

proj, err := project.New(pjfile, nil)
require.NoError(t, err)

cfg, err := config.New()
require.NoError(t, err)
defer func() { require.NoError(t, cfg.Close()) }()
Expand All @@ -384,7 +383,6 @@ func captureExecCommand(t *testing.T, tmplCmdName, cmdName string, cmdArgs []str
}
})
require.NoError(t, outErr, "error capturing stdout")

return outStr, err
}

Expand Down

0 comments on commit 9172459

Please sign in to comment.