From dd6b83048b7cfca6df64868880600a9b643ec822 Mon Sep 17 00:00:00 2001 From: Bernd Mueller Date: Thu, 30 Nov 2023 17:14:06 +0100 Subject: [PATCH] Fix merge issues --- tests/e2e/actions.go | 6 +++--- tests/e2e/main.go | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/e2e/actions.go b/tests/e2e/actions.go index fa106a285c..788a924f36 100644 --- a/tests/e2e/actions.go +++ b/tests/e2e/actions.go @@ -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) } @@ -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 { diff --git a/tests/e2e/main.go b/tests/e2e/main.go index f4ecc67045..e59f70b59c 100644 --- a/tests/e2e/main.go +++ b/tests/e2e/main.go @@ -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 } @@ -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() @@ -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)) } @@ -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 { @@ -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) @@ -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.