diff --git a/indexer/client/client_test.go b/indexer/client/client_test.go index 3ac2b97..15d76c5 100644 --- a/indexer/client/client_test.go +++ b/indexer/client/client_test.go @@ -16,6 +16,10 @@ const ( ) func TestQuery_VerifyMetadata_token(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests in short mode.") + } + grpcClient, err := NewAergoClient(AergoServerAddress, context.Background()) require.NoError(t, err) @@ -32,6 +36,10 @@ func TestQuery_VerifyMetadata_token(t *testing.T) { } func TestQuery_VerifyMetadata_contract(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests in short mode.") + } + grpcClient, err := NewAergoClient(AergoServerAddress, context.Background()) require.NoError(t, err) @@ -43,6 +51,10 @@ func TestQuery_VerifyMetadata_contract(t *testing.T) { } func TestQuery_BalanceOf(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests in short mode.") + } + ctx := context.Background() grpcClient, err := NewAergoClient(AergoServerAddress, ctx) @@ -64,6 +76,10 @@ func TestQuery_BalanceOf(t *testing.T) { } func TestQuery_TokenInfo(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests in short mode.") + } + grpcClient, err := NewAergoClient(AergoServerAddress, context.Background()) require.NoError(t, err) @@ -90,6 +106,10 @@ func TestQuery_TokenInfo(t *testing.T) { } func TestQuery_NFTMetadata(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests in short mode.") + } + grpcClient, err := NewAergoClient(AergoServerAddress, context.Background()) require.NoError(t, err) diff --git a/indexer/documents/conv_test.go b/indexer/documents/conv_test.go index 9a8bc77..3441650 100644 --- a/indexer/documents/conv_test.go +++ b/indexer/documents/conv_test.go @@ -48,6 +48,7 @@ func TestConvBlock(t *testing.T) { Size: 207, TxCount: 11, PreviousBlock: "9CEiURiJbPpxg3JdsXVZAJLsvhMQfMVCytoPdmiJ1Tga", + Coinbase: "5t64bLzisGj793C28zDfkhs8uWitZLoPqj98fMBj27GeRnhbAUEW94d6mhW", BlockProducer: "16Uiu2HAmGiJ2QgVAWHMUtzLKKNM5eFUJ3Ds3FN7nYJq1mHN5ZPj9", RewardAccount: "554c66wDnfgGQ2XmBq7Q9jmHuTpNZ", RewardAmount: "160000000000000000", @@ -72,8 +73,9 @@ func TestConvTx(t *testing.T) { FeeDelegation: true, GasUsed: 100000, }, &EsBlock{ - BlockNo: 1, - Timestamp: time.Unix(0, 1668652376002288214), + BaseEsType: &BaseEsType{Id: ""}, + BlockNo: 1, + Timestamp: time.Unix(0, 1668652376002288214), }, &EsTx{ TxIdx: 0, BaseEsType: &BaseEsType{Id: "8Zj68cFzrzUtwPe6kZF8qPgVp9LbsefjdTsi4C3hVY8"}, @@ -87,7 +89,8 @@ func TestConvTx(t *testing.T) { Category: tx.TxTransfer, Status: "", FeeDelegation: true, - GasPrice: "0", + FeeUsed: "0", + GasPrice: "50000000000", GasLimit: 0, GasUsed: 100000, }) diff --git a/lua_compiler/compiler_test.go b/lua_compiler/compiler_test.go index 4789d46..89269a5 100644 --- a/lua_compiler/compiler_test.go +++ b/lua_compiler/compiler_test.go @@ -11,12 +11,20 @@ import ( ) func TestGetData(t *testing.T) { + if testing.Short() { + t.Skip("This test depends on remote service") + } + data, err := GetCode("https://github.com/aergoio/ARC2NFT/raw/master/src/ARC2-Mintable.lua") require.NoError(t, err) fmt.Println(data) } func TestCompile(t *testing.T) { + if testing.Short() { + t.Skip("This test depends on remote service") + } + code := readLuaCode("type_arrayarg.lua") byteCode, err := CompileCode(code) require.NoError(t, err) @@ -25,6 +33,10 @@ func TestCompile(t *testing.T) { } func TestGetDataAndCompile(t *testing.T) { + if testing.Short() { + t.Skip("This test depends on remote service") + } + code, err := GetCode("https://github.com/aergoio/ARC2NFT/raw/master/src/ARC2-Mintable.lua") require.NoError(t, err) fmt.Println(code)