Skip to content
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

Skip test that depends of environments. #63

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions indexer/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand All @@ -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)
Expand All @@ -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)

Expand All @@ -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)

Expand Down
9 changes: 6 additions & 3 deletions indexer/documents/conv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func TestConvBlock(t *testing.T) {
Size: 207,
TxCount: 11,
PreviousBlock: "9CEiURiJbPpxg3JdsXVZAJLsvhMQfMVCytoPdmiJ1Tga",
Coinbase: "5t64bLzisGj793C28zDfkhs8uWitZLoPqj98fMBj27GeRnhbAUEW94d6mhW",
BlockProducer: "16Uiu2HAmGiJ2QgVAWHMUtzLKKNM5eFUJ3Ds3FN7nYJq1mHN5ZPj9",
RewardAccount: "554c66wDnfgGQ2XmBq7Q9jmHuTpNZ",
RewardAmount: "160000000000000000",
Expand All @@ -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"},
Expand All @@ -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,
})
Expand Down
12 changes: 12 additions & 0 deletions lua_compiler/compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Loading