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