MCPcopy Create free account
hub / github.com/celer-pkg/celer / runIntegrate

Function runIntegrate

cmds/cmd_integrate_test.go:111–130  ·  view source on GitHub ↗
(t *testing.T, args ...string)

Source from the content-addressed store, hash-verified

109}
110
111func runIntegrate(t *testing.T, args ...string) (homeDir string, stderr string, err error) {
112 t.Helper()
113
114 homeDir = t.TempDir()
115 if runtime.GOOS == "windows" {
116 t.Setenv("USERPROFILE", homeDir)
117 } else {
118 t.Setenv("HOME", homeDir)
119 t.Setenv("SHELL", "/bin/bash")
120 // Pre-create an empty .bashrc; bash.installBinary reads it before
121 // appending the PATH export line and a missing rc is a hard error.
122 if err := os.WriteFile(filepath.Join(homeDir, ".bashrc"), nil, 0o644); err != nil {
123 t.Fatal(err)
124 }
125 }
126
127 cmd := &integrateCmd{}
128 stderr, err = runCommand(t, cmd.Command(configs.NewCeler()), args...)
129 return homeDir, stderr, err
130}
131
132func integrateArtifacts(homeDir string) []string {
133 if runtime.GOOS == "windows" {

Callers 1

Calls 4

CommandMethod · 0.95
NewCelerFunction · 0.92
runCommandFunction · 0.85
WriteFileMethod · 0.80

Tested by

no test coverage detected