Skip to content

Commit

Permalink
fix e2e when run on current ws (invalid sem version)
Browse files Browse the repository at this point in the history
  • Loading branch information
bermuell committed Aug 13, 2024
1 parent a4630a5 commit 55835d1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/e2e/test_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,16 @@ func (td *DefaultDriver) runAction(action interface{}) error {
target.submitTextProposal(action, td.verbose)
case SubmitConsumerAdditionProposalAction:
target = td.getTargetDriver(action.Chain)
if semver.Compare(semver.Major(target.testConfig.providerVersion), "v5") < 0 {
version := target.testConfig.providerVersion
if semver.IsValid(version) && semver.Compare(semver.Major(version), "v5") < 0 {
target.submitConsumerAdditionLegacyProposal(action, td.verbose)
} else {
target.submitConsumerAdditionProposal(action, td.verbose)
}
case SubmitConsumerRemovalProposalAction:
version := target.testConfig.providerVersion
target = td.getTargetDriver(action.Chain)
if semver.Compare(semver.Major(target.testConfig.providerVersion), "v5") < 0 {
if semver.IsValid(version) && semver.Compare(semver.Major(version), "v5") < 0 {
target.submitConsumerRemovalLegacyProposal(action, td.verbose)
} else {
target.submitConsumerRemovalProposal(action, td.verbose)
Expand All @@ -157,7 +159,8 @@ func (td *DefaultDriver) runAction(action interface{}) error {
target.submitEnableTransfersProposalAction(action, td.verbose)
case SubmitConsumerModificationProposalAction:
target = td.getTargetDriver(action.Chain)
if semver.Compare(semver.Major(target.testConfig.providerVersion), "v5") < 0 {
version := target.testConfig.providerVersion
if semver.IsValid(version) && semver.Compare(semver.Major(version), "v5") < 0 {
target.submitConsumerModificationLegacyProposal(action, td.verbose)
} else {
target.submitConsumerModificationProposal(action, td.verbose)
Expand Down

0 comments on commit 55835d1

Please sign in to comment.