Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bermuell committed Nov 30, 2023
1 parent e9b50e4 commit dd6b830
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (tr *TestRun) startChain(
}

startChainScript := "/testnet-scripts/start-chain.sh"
if tr.providerVersion != "" && chainConfig.BinaryName == "interchain-security-pd" {
if tr.providerVersion != "" && chainConfig.binaryName == "interchain-security-pd" {
log.Printf("Using start-chain script for provider version '%s'", tr.providerVersion)
startChainScript = fmt.Sprintf("/provider-%s/testnet-scripts/start-chain.sh", tr.providerVersion)
}
Expand Down Expand Up @@ -587,12 +587,12 @@ func (tr *TestRun) startConsumerChain(
panic(fmt.Sprintf("failed writing ccv consumer file : %v", err))
}
os.WriteFile(file.Name(), bz, 0644)
cmd := exec.Command("docker", "cp", file.Name(), fmt.Sprintf("%s:/tmp/%s", tr.containerConfig.InstanceName, file.Name()))
cmd := exec.Command("docker", "cp", file.Name(), fmt.Sprintf("%s:/tmp/%s", tr.containerConfig.instanceName, file.Name()))
bz, err = cmd.CombinedOutput()
if err != nil {
log.Fatal(err, "\n", string(bz))
}
cmd = exec.Command("docker", "exec", tr.containerConfig.InstanceName, tr.chainConfigs[action.ConsumerChain].BinaryName,
cmd = exec.Command("docker", "exec", tr.containerConfig.instanceName, tr.chainConfigs[action.consumerChain].binaryName,
"genesis", "transform", fmt.Sprintf("/tmp/%s", file.Name()))
bz, err = cmd.CombinedOutput()
if err != nil {
Expand Down
16 changes: 8 additions & 8 deletions tests/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ func main() {
if shortHappyPathOnly != nil && *shortHappyPathOnly {
fmt.Println("=============== running short happy path only ===============")
tr := DefaultTestRun()
tr.Run(shortHappyPathSteps, *localSdkPath, *useGaia, *gaiaTag)
tr.Run(shortHappyPathSteps, *localSdkPath, *useGaia, *gaiaTag, *useConsumerVersion, *useProviderVersion)
return
}

if happyPathOnly != nil && *happyPathOnly {
fmt.Println("=============== running happy path only ===============")
tr := DefaultTestRun()
tr.Run(happyPathSteps, *localSdkPath, *useGaia, *gaiaTag)
tr.Run(happyPathSteps, *localSdkPath, *useGaia, *gaiaTag, *useConsumerVersion, *useProviderVersion)
return
}

Expand Down Expand Up @@ -86,7 +86,7 @@ func main() {
go func(run testRunWithSteps) {
defer wg.Done()
tr := run.testRun
tr.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag)
tr.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag, *useConsumerVersion, *useProviderVersion)
}(run)
}
wg.Wait()
Expand All @@ -96,7 +96,7 @@ func main() {

for _, run := range testRuns {
tr := run.testRun
tr.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag)
tr.Run(run.steps, *localSdkPath, *useGaia, *gaiaTag, *useConsumerVersion, *useProviderVersion)
}
fmt.Printf("TOTAL TIME ELAPSED: %v\n", time.Since(start))
}
Expand Down Expand Up @@ -217,7 +217,7 @@ func (tr *TestRun) executeSteps(steps []Step) {
fmt.Printf("=============== finished %s tests in %v ===============\n", tr.name, time.Since(start))
}

func (tr *TestConfig) buildDockerImages() {
func (tr *TestRun) buildDockerImages() {
fmt.Printf("=============== building %s images ===============\n", tr.name)
tmpDir, err := os.MkdirTemp(os.TempDir(), "e2eWorkTree")
if err != nil {
Expand All @@ -238,7 +238,7 @@ func (tr *TestConfig) buildDockerImages() {
}
}

func (tr *TestConfig) startDocker() {
func (tr *TestRun) startDocker() {
tr.buildDockerImages()
fmt.Printf("=============== building %s testRun ===============\n", tr.name)

Expand Down Expand Up @@ -272,8 +272,8 @@ func (tr *TestConfig) startDocker() {
scriptStr := fmt.Sprintf(
"tests/e2e/testnet-scripts/start-docker.sh %s %s %s",
strings.Join(options, " "),
tr.containerConfig.ContainerName,
tr.containerConfig.InstanceName,
tr.containerConfig.containerName,
tr.containerConfig.instanceName,
)

//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
Expand Down

0 comments on commit dd6b830

Please sign in to comment.