From dd727a6b4cddc64d4a3722f4d3cbed5c822644d1 Mon Sep 17 00:00:00 2001 From: dylanyang Date: Mon, 13 May 2024 20:30:57 +0800 Subject: [PATCH] fix comment --- cmd/server/api_test.go | 3 +++ common/ethereum_contract/ethereum_client_test.go | 4 +++- common/network/arbitrum/arbitrum_test.go | 3 +++ common/network/ethereum_adaptable_executor_test.go | 3 +++ common/network/pre_verification_gas_test.go | 4 +++- common/price_compoent/price_util_test.go | 3 +++ config/config_test.go | 6 ++++++ gas_executor/gas_computor_test.go | 3 +++ service/chain_service/chain_service_test.go | 4 +++- 9 files changed, 30 insertions(+), 3 deletions(-) diff --git a/cmd/server/api_test.go b/cmd/server/api_test.go index fc072816..f6c8107d 100644 --- a/cmd/server/api_test.go +++ b/cmd/server/api_test.go @@ -40,6 +40,9 @@ func APITestCall(engine *gin.Engine, method, url string, body any, response any, } func TestAPI(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } initEngine("../../config/basic_strategy_config.json", "../../config/basic_config.json", "../../config/secret_config.json") tests := []struct { diff --git a/common/ethereum_contract/ethereum_client_test.go b/common/ethereum_contract/ethereum_client_test.go index c0819fb7..03ace1d0 100644 --- a/common/ethereum_contract/ethereum_client_test.go +++ b/common/ethereum_contract/ethereum_client_test.go @@ -14,7 +14,9 @@ import ( ) func TestPaymasterV07(t *testing.T) { - + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../../config/basic_strategy_config.json", "../../config/basic_config.json", "../../config/secret_config.json") network := config.GetNewWorkClientURl(global_const.EthereumSepolia) contractAddress := common.HexToAddress("0x3Da96267B98a33267249734FD8FFeC75093D3085") diff --git a/common/network/arbitrum/arbitrum_test.go b/common/network/arbitrum/arbitrum_test.go index 0f57d71a..6eeeb84e 100644 --- a/common/network/arbitrum/arbitrum_test.go +++ b/common/network/arbitrum/arbitrum_test.go @@ -11,6 +11,9 @@ import ( ) func TestGetArbitrumGas(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../../../config/basic_strategy_config.json", "../../../config/basic_config.json", "../../../config/secret_config.json") strategy := config.GetBasicStrategyConfig("Arbitrum_Sepolia_v06_verifyPaymaster") if strategy == nil { diff --git a/common/network/ethereum_adaptable_executor_test.go b/common/network/ethereum_adaptable_executor_test.go index 1fad541f..cb6197f6 100644 --- a/common/network/ethereum_adaptable_executor_test.go +++ b/common/network/ethereum_adaptable_executor_test.go @@ -16,6 +16,9 @@ import ( ) func TestEthereumAdaptableExecutor(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../../config/basic_strategy_config.json", "../../config/basic_config.json", "../../config/secret_config.json") logrus.SetLevel(logrus.DebugLevel) op, err := user_op.NewUserOp(utils.GenerateMockUservOperation()) diff --git a/common/network/pre_verification_gas_test.go b/common/network/pre_verification_gas_test.go index 3dfc187a..0e8b613c 100644 --- a/common/network/pre_verification_gas_test.go +++ b/common/network/pre_verification_gas_test.go @@ -7,7 +7,9 @@ import ( ) func TestPreVerGas(t *testing.T) { - + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../../config/basic_strategy_config.json", "../../config/basic_config.json", "../../config/secret_config.json") logrus.SetLevel(logrus.DebugLevel) diff --git a/common/price_compoent/price_util_test.go b/common/price_compoent/price_util_test.go index 203a1c7b..9f104f77 100644 --- a/common/price_compoent/price_util_test.go +++ b/common/price_compoent/price_util_test.go @@ -9,6 +9,9 @@ import ( ) func TestPriceUtilTest(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../../config/basic_strategy_config.json", "../../config/basic_config.json", "../../config/secret_config.json") tests := []struct { name string diff --git a/config/config_test.go b/config/config_test.go index 6740b9c5..1684e669 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -6,6 +6,9 @@ import ( ) func TestSecretConfigInit(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } secretConfigInit("../config/secret_config.json") config := GetNetworkSecretConfig(global_const.EthereumSepolia) t.Log(config.RpcUrl) @@ -13,6 +16,9 @@ func TestSecretConfigInit(t *testing.T) { t.Log(GetSigner(global_const.EthereumSepolia).Address.Hex()) } func TestConfigInit(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } InitConfig("../config/basic_strategy_config.json", "../config/basic_config.json", "../config/secret_config.json") strategy := GetBasicStrategyConfig("Ethereum_Sepolia_v06_verifyPaymaster") if strategy == nil { diff --git a/gas_executor/gas_computor_test.go b/gas_executor/gas_computor_test.go index b7bfcad8..26107316 100644 --- a/gas_executor/gas_computor_test.go +++ b/gas_executor/gas_computor_test.go @@ -43,6 +43,9 @@ func TestComputeGas(t *testing.T) { //assert.NotNil(t, gas) //jsonBypte, _ := json.Marshal(gas) //fmt.Println(string(jsonBypte)) + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../config/basic_strategy_config.json", "../config/basic_config.json", "../config/secret_config.json") logrus.SetLevel(logrus.DebugLevel) op, err := user_op.NewUserOp(utils.GenerateMockUservOperation()) diff --git a/service/chain_service/chain_service_test.go b/service/chain_service/chain_service_test.go index 0363e396..d37720bc 100644 --- a/service/chain_service/chain_service_test.go +++ b/service/chain_service/chain_service_test.go @@ -19,7 +19,9 @@ import ( ) func TestChainService(t *testing.T) { - + if testing.Short() { + t.Skip("skipping test in short mode.") + } config.InitConfig("../../config/basic_strategy_config.json", "../../config/basic_config.json", "../../config/secret_config.json") logrus.SetLevel(logrus.DebugLevel) op, err := user_op.NewUserOp(utils.GenerateMockUservOperation())