Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Apr 13, 2024
1 parent 3990b69 commit 259e11b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion systemtests/system.go
Expand Up @@ -727,7 +727,7 @@ func locateExecutable(file string) string {
panic(fmt.Sprintf("unexpected error with file %q: %s", file, err.Error()))
}
if path == "" {
panic(fmt.Sprintf("%q not founc", file))
panic(fmt.Sprintf("%q not found", file))
}
return path
}
Expand Down
13 changes: 10 additions & 3 deletions systemtests/testnet_init.go
Expand Up @@ -96,13 +96,20 @@ func (s LegacyTestnetInitializer) Initialize() {
"--minimum-gas-prices=" + s.minGasPrice,
}
fmt.Printf("+++ %s %s\n", s.execBinary, strings.Join(args, " "))
executable := locateExecutable(s.execBinary)
fmt.Printf("+++X %s %s\n", executable, strings.Join(args, " "))
cmd := exec.Command( //nolint:gosec
locateExecutable(s.execBinary),
executable,
args...,
)

Check failure

Code scanning / gosec

Subprocess launched with variable Error

Subprocess launched with variable
cmd.Dir = s.workDir
out := mustV(cmd.CombinedOutput())
s.log(string(out))
out, err := cmd.CombinedOutput()
if out != nil {
s.log(string(out))
}
if err != nil {
panic(err.Error())
}

nodeAddresses := make([]string, s.initialNodesCount)
for i := 0; i < s.initialNodesCount; i++ {
Expand Down
7 changes: 4 additions & 3 deletions systemtests/upgrade_test.go
Expand Up @@ -105,8 +105,9 @@ func FetchExecutable(t *testing.T, version string) string {
}
destFile := filepath.Join(cacheFolder, "simd_"+version)
t.Log("+++ version not in cache, downloading from docker image")
runShellCmd(t, "docker", "pull", "ghcr.io/cosmos/simapp:"+version)
runShellCmd(t, "docker", "create", "--name=ci_temp", "ghcr.io/cosmos/simapp:"+version)
runShellCmd(t, "docker", "cp", "ci_temp:/usr/bin/simd", destFile)
t.Logf("docker pull: %s\n", runShellCmd(t, "docker", "pull", "ghcr.io/cosmos/simapp:"+version))
t.Logf("docker create: %s\n", runShellCmd(t, "docker", "create", "--name=ci_temp", "ghcr.io/cosmos/simapp:"+version))
t.Logf("docker cp: %s\n", runShellCmd(t, "docker", "cp", "ci_temp:/usr/bin/simd", destFile))
t.Logf("ls %q: %s\n", cacheDir, runShellCmd(t, "ls", "-la", cacheDir))
return destFile
}

0 comments on commit 259e11b

Please sign in to comment.