Tests are classified by tags
This commit is contained in:
parent
9225ada004
commit
9409907f80
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package bch
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build integration
|
||||
|
||||
package bch
|
||||
|
||||
import (
|
||||
@ -230,11 +232,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockHash(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBCashRPC_GetBlockHash(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -251,11 +249,7 @@ func TestRPC_GetBlockHash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBCashRPC_GetBlockRaw(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -274,11 +268,7 @@ func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlock(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBCashRPC_GetBlock(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -302,11 +292,7 @@ func TestRPC_GetBlock(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestRPC_GetTransaction(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBCashRPC_GetTransaction(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package btc
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build integration
|
||||
|
||||
package btc
|
||||
|
||||
import (
|
||||
@ -208,11 +210,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockHash(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBitcoinRPC_GetBlockHash(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -229,11 +227,7 @@ func TestRPC_GetBlockHash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBitcoinRPC_GetBlockRaw(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -252,11 +246,7 @@ func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlock(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBitcoinRPC_GetBlock(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -280,11 +270,7 @@ func TestRPC_GetBlock(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestRPC_GetTransaction(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestBitcoinRPC_GetTransaction(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package btg
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build integration
|
||||
|
||||
package dash
|
||||
|
||||
import (
|
||||
@ -193,11 +195,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockHash(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestDashRPC_GetBlockHash(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -214,11 +212,7 @@ func TestRPC_GetBlockHash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestDashRPC_GetBlockRaw(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -237,11 +231,7 @@ func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlock(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestDashRPC_GetBlock(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -265,11 +255,7 @@ func TestRPC_GetBlock(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestRPC_GetTransaction(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestDashRPC_GetTransaction(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package eth
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build integration
|
||||
|
||||
package eth
|
||||
|
||||
import (
|
||||
@ -36,9 +38,6 @@ func setupEthRPC() *EthereumRPC {
|
||||
}
|
||||
|
||||
func TestEthRPC_getBestHeader(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
type fields struct {
|
||||
b *EthereumRPC
|
||||
}
|
||||
@ -68,9 +67,6 @@ func TestEthRPC_getBestHeader(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_GetBestBlockHash(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
type fields struct {
|
||||
b *EthereumRPC
|
||||
}
|
||||
@ -104,9 +100,6 @@ func TestEthRPC_GetBestBlockHash(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_GetBestBlockHeight(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
type fields struct {
|
||||
b *EthereumRPC
|
||||
}
|
||||
@ -139,9 +132,6 @@ func TestEthRPC_GetBestBlockHeight(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_GetBlockHash(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
type fields struct {
|
||||
b *EthereumRPC
|
||||
}
|
||||
@ -202,9 +192,6 @@ func TestEthRPC_GetBlockHash(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_GetBlockHeader(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
bh, err := setupEthRPC().getBestHeader()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -262,9 +249,6 @@ func TestEthRPC_GetBlockHeader(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_GetBlock(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
bh, err := setupEthRPC().getBestHeader()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -372,9 +356,6 @@ func TestEthRPC_GetTransaction(t *testing.T) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
bh, err := setupEthRPC().getBestHeader()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -466,9 +447,6 @@ func TestEthRPC_GetTransaction(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_EstimateFee(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
type fields struct {
|
||||
b *EthereumRPC
|
||||
}
|
||||
@ -508,9 +486,6 @@ func TestEthRPC_EstimateFee(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEthRPC_GetMempool(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
type fields struct {
|
||||
b *EthereumRPC
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package litecoin
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package zec
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build integration
|
||||
|
||||
package zec
|
||||
|
||||
import (
|
||||
@ -167,11 +169,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockHash(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestZCashRPC_GetBlockHash(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -188,11 +186,7 @@ func TestRPC_GetBlockHash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestZCashRPC_GetBlockRaw(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -211,11 +205,7 @@ func TestRPC_GetBlockRaw(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRPC_GetBlock(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestZCashRPC_GetBlock(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@ -239,11 +229,7 @@ func TestRPC_GetBlock(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestRPC_GetTransaction(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
func TestZCashRPC_GetTransaction(t *testing.T) {
|
||||
cli, err := getRPCClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@ -23,10 +23,10 @@ tools:
|
||||
chown $(PACKAGER) /out/{ldb,sst_dump}
|
||||
|
||||
test: prepare-sources
|
||||
cd $(GOPATH)/src/blockbook && go test -short ./... $(ARGS)
|
||||
cd $(GOPATH)/src/blockbook && go test -tags unittest ./... $(ARGS)
|
||||
|
||||
test-all: prepare-sources
|
||||
cd $(GOPATH)/src/blockbook && go test ./... $(ARGS)
|
||||
cd $(GOPATH)/src/blockbook && go test -tags 'unittest integration' ./... $(ARGS)
|
||||
|
||||
prepare-sources:
|
||||
@ [ -n "`ls /src 2> /dev/null`" ] || (echo "/src doesn't exist or is empty" 1>&2 && exit 1)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// +build unittest
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user