-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated integration tests to use gasschedule v4 #3798
Conversation
Codecov Report
@@ Coverage Diff @@
## development #3798 +/- ##
===============================================
- Coverage 74.62% 74.62% -0.01%
===============================================
Files 606 606
Lines 79672 79672
===============================================
- Hits 59457 59455 -2
- Misses 15640 15641 +1
- Partials 4575 4576 +1
Continue to review full report at Codecov.
|
@@ -308,7 +309,7 @@ func TestMultipleTimesERC20BigIntInBatches(t *testing.T) { | |||
t.Skip("this is not a short test") | |||
} | |||
|
|||
gasSchedule, _ := common.LoadGasScheduleConfig("../../../../cmd/node/config/gasSchedules/gasScheduleV2.toml") | |||
gasSchedule, _ := common.LoadGasScheduleConfig(arwen.GasSchedulePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -1,3 +1,4 @@ | |||
//go:build !race |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arwen should be ok now. Maybe remove these pre-processor lines along with the following TODO?
Valid on all files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed from all files in integrationstests/vm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems not to be ready yet... undid the remove
integrationTests/vm/arwen/utils.go
Outdated
@@ -66,7 +66,7 @@ var oneShardCoordinator = mock.NewMultiShardsCoordinatorMock(2) | |||
var pkConverter, _ = pubkeyConverter.NewHexPubkeyConverter(32) | |||
|
|||
// GasSchedulePath -- | |||
var GasSchedulePath = "../../../../cmd/node/config/gasSchedules/gasScheduleV2.toml" | |||
var GasSchedulePath = "../../../../cmd/node/config/gasSchedules/gasScheduleV4.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this util package.... I think we can move this var (that can be a const, actually) in the integrationTests/testInitializer.go and we can slowly dissolve this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
…lev4-improvement # Conflicts: # integrationTests/vm/arwen/arwenvm/gasSchedule_test.go
…4-improvement updated integration tests to use gasschedule v4 improvement
@@ -118,12 +120,12 @@ func TestDelegation_Claims(t *testing.T) { | |||
context.GasLimit = 30000000 | |||
err = context.ExecuteSC(&context.Alice, "claimRewards") | |||
require.Nil(t, err) | |||
require.Equal(t, 22313926, int(context.LastConsumedFee)) | |||
require.Equal(t, 8148760, int(context.LastConsumedFee)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@@ -20,9 +22,9 @@ func TestDNS_Register(t *testing.T) { | |||
|
|||
var empty struct{} | |||
arwen.DNSAddresses[string(expectedDNSAddress)] = empty | |||
arwen.GasSchedulePath = "../../../cmd/node/config/gasSchedules/gasScheduleV2.toml" | |||
gasScheduleConfigPath := strings.ReplaceAll(integrationTests.GasSchedulePath, "../../../..", "../../..") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite tricky.
We could have used filepath.Abs() in the definition of integrationTests.GasSchedulePath
and never worry about relative paths when using it in other packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
talk about it, and can remain like this for now
just integration test changes