Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Oct 2, 2023
1 parent 67ec715 commit 3a3e157
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions tests/e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,25 +395,25 @@ func ChangeoverTestConfig() TestConfig {
return tr
}

func (tr *TestRun) SetDockerConfig(localSdkPath string, useGaia bool, gaiaTag string) {
func (s *TestConfig) SetDockerConfig(localSdkPath string, useGaia bool, gaiaTag string) {
if localSdkPath != "" {
fmt.Println("USING LOCAL SDK", localSdkPath)
}
if useGaia {
fmt.Println("USING GAIA INSTEAD OF ICS provider app", gaiaTag)
}

tr.useGaia = useGaia
tr.gaiaTag = gaiaTag
tr.localSdkPath = localSdkPath
s.useGaia = useGaia
s.gaiaTag = gaiaTag
s.localSdkPath = localSdkPath
}

func (tr *TestRun) SetCometMockConfig(useCometmock bool) {
tr.useCometmock = useCometmock
func (s *TestConfig) SetCometMockConfig(useCometmock bool) {
s.useCometmock = useCometmock
}

func (tr *TestRun) SetRelayerConfig(useRly bool) {
tr.useGorelayer = useRly
func (s *TestConfig) SetRelayerConfig(useRly bool) {
s.useGorelayer = useRly
}

// validateStringLiterals enforces that configs follow the constraints
Expand All @@ -423,8 +423,8 @@ func (tr *TestRun) SetRelayerConfig(useRly bool) {
// within the container will be named as "$CHAIN_ID-$VAL_ID-out" etc.
// where this name is constrained to 15 bytes or less. Therefore each string literal
// used as a validatorID or chainID needs to be 5 char or less.
func (tr *TestRun) validateStringLiterals() {
for valID, valConfig := range tr.validatorConfigs {
func (s *TestConfig) validateStringLiterals() {
for valID, valConfig := range s.validatorConfigs {
if len(valID) > 5 {
panic("validator id string literal must be 5 char or less")
}
Expand All @@ -447,7 +447,7 @@ func (tr *TestRun) validateStringLiterals() {
}
}

for chainID, chainConfig := range tr.chainConfigs {
for chainID, chainConfig := range s.chainConfigs {
if len(chainID) > 5 {
panic("chain id string literal must be 5 char or less")
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ func (tr TestConfig) curlJsonRPCRequest(method, params, address string) {
executeCommandWithVerbosity(cmd, "curlJsonRPCRequest", verbosity)
}

func (tr TestRun) getProposedConsumerChains(chain ChainID) []string {
func (tr TestConfig) getProposedConsumerChains(chain ChainID) []string {
tr.waitBlocks(chain, 1, 10*time.Second)
//#nosec G204 -- Bypass linter warning for spawning subprocess with cmd arguments.
bz, err := exec.Command("docker", "exec", tr.containerConfig.InstanceName, tr.chainConfigs[chain].BinaryName,
Expand Down

0 comments on commit 3a3e157

Please sign in to comment.