From 40285100811c0efa85b683b50a3d8bd08a8dc315 Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Tue, 5 Sep 2023 16:30:49 +0300 Subject: [PATCH 1/2] import gomock in test templ --- .../abi/bind/precompilebind/precompile_config_test_template.go | 1 + 1 file changed, 1 insertion(+) diff --git a/accounts/abi/bind/precompilebind/precompile_config_test_template.go b/accounts/abi/bind/precompilebind/precompile_config_test_template.go index 42a0e0e6e7..9c55d1cf26 100644 --- a/accounts/abi/bind/precompilebind/precompile_config_test_template.go +++ b/accounts/abi/bind/precompilebind/precompile_config_test_template.go @@ -20,6 +20,7 @@ import ( "github.com/ava-labs/subnet-evm/precompile/allowlist" "github.com/ethereum/go-ethereum/common" + "go.uber.org/mock/gomock" {{- end}} ) From 2b0f0a6825045f8d53132e959f293b051acdc86f Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Tue, 5 Sep 2023 16:34:25 +0300 Subject: [PATCH 2/2] fix test suite --- accounts/abi/bind/precompilebind/precompile_bind_test.go | 2 +- .../abi/bind/precompilebind/precompile_config_test_template.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/bind/precompilebind/precompile_bind_test.go b/accounts/abi/bind/precompilebind/precompile_bind_test.go index ee4e56763d..1c6be5c3f9 100644 --- a/accounts/abi/bind/precompilebind/precompile_bind_test.go +++ b/accounts/abi/bind/precompilebind/precompile_bind_test.go @@ -516,7 +516,7 @@ func TestPrecompileBind(t *testing.T) { if err = os.WriteFile(filepath.Join(precompilePath, "contract.go"), []byte(bindedFiles.Contract), 0o600); err != nil { t.Fatalf("test %d: failed to write binding: %v", i, err) } - if err = os.WriteFile(filepath.Join(precompilePath, "contract_test.go"), []byte(bindedFiles.ConfigTest), 0o600); err != nil { + if err = os.WriteFile(filepath.Join(precompilePath, "config_test.go"), []byte(bindedFiles.ConfigTest), 0o600); err != nil { t.Fatalf("test %d: failed to write binding: %v", i, err) } if err = os.WriteFile(filepath.Join(precompilePath, "contract_test.go"), []byte(bindedFiles.ContractTest), 0o600); err != nil { diff --git a/accounts/abi/bind/precompilebind/precompile_config_test_template.go b/accounts/abi/bind/precompilebind/precompile_config_test_template.go index 9c55d1cf26..cd19f6682c 100644 --- a/accounts/abi/bind/precompilebind/precompile_config_test_template.go +++ b/accounts/abi/bind/precompilebind/precompile_config_test_template.go @@ -20,8 +20,8 @@ import ( "github.com/ava-labs/subnet-evm/precompile/allowlist" "github.com/ethereum/go-ethereum/common" - "go.uber.org/mock/gomock" {{- end}} + "go.uber.org/mock/gomock" ) // TestVerify tests the verification of Config.