Skip to content

Commit

Permalink
Remove minimum client version test
Browse files Browse the repository at this point in the history
  • Loading branch information
karlb committed Feb 28, 2023
1 parent 36af760 commit 1e4f79d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
21 changes: 0 additions & 21 deletions contracts/blockchain_parameters/blockchain_parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,6 @@ import (
. "github.com/onsi/gomega"
)

func TestGetMinimumVersion(t *testing.T) {
testutil.TestFailOnFailingRunner(t, getMinimumVersion)
testutil.TestFailsWhenContractNotDeployed(t, contracts.ErrSmartContractNotDeployed, getMinimumVersion)

t.Run("should return minimum version", func(t *testing.T) {
g := NewGomegaWithT(t)

runner := testutil.NewSingleMethodRunner(
params.BlockchainParametersRegistryId,
"getMinimumClientVersion",
func() (*big.Int, *big.Int, *big.Int) {
return big.NewInt(5), big.NewInt(4), big.NewInt(3)
},
)

version, err := getMinimumVersion(runner)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(version).To(Equal(&params.VersionInfo{Major: 5, Minor: 4, Patch: 3}))
})
}

func TestGetIntrinsicGasForAlternativeFeeCurrency(t *testing.T) {
testutil.TestFailOnFailingRunner(t, getIntrinsicGasForAlternativeFeeCurrency)
testutil.TestFailsWhenContractNotDeployed(t, contracts.ErrSmartContractNotDeployed, getIntrinsicGasForAlternativeFeeCurrency)
Expand Down
3 changes: 0 additions & 3 deletions contracts/testutil/blockchain_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ func NewBlockchainParametersMock() *BlockchainParametersMock {
return mock
}

func (bp *BlockchainParametersMock) GetMinimumClientVersion() (*big.Int, *big.Int, *big.Int) {
return big.NewInt(int64(bp.MinimumVersion.Major)), big.NewInt(int64(bp.MinimumVersion.Minor)), big.NewInt(int64(bp.MinimumVersion.Patch))
}
func (bp *BlockchainParametersMock) BlockGasLimit() *big.Int {
return bp.BlockGasLimitValue
}
Expand Down

0 comments on commit 1e4f79d

Please sign in to comment.