diff --git a/api/accounts/accounts_test.go b/api/accounts/accounts_test.go index 8630bea4b..7218d3ec6 100644 --- a/api/accounts/accounts_test.go +++ b/api/accounts/accounts_test.go @@ -22,7 +22,7 @@ import ( "github.com/vechain/thor/v2/api/accounts" "github.com/vechain/thor/v2/block" "github.com/vechain/thor/v2/genesis" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/tx" diff --git a/api/blocks/blocks_test.go b/api/blocks/blocks_test.go index dcb6c4e94..defe1a243 100644 --- a/api/blocks/blocks_test.go +++ b/api/blocks/blocks_test.go @@ -21,7 +21,7 @@ import ( "github.com/vechain/thor/v2/api/blocks" "github.com/vechain/thor/v2/block" "github.com/vechain/thor/v2/genesis" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/tx" diff --git a/api/debug/debug_test.go b/api/debug/debug_test.go index 1275a9030..7ce243048 100644 --- a/api/debug/debug_test.go +++ b/api/debug/debug_test.go @@ -22,10 +22,10 @@ import ( "github.com/vechain/thor/v2/block" "github.com/vechain/thor/v2/builtin" "github.com/vechain/thor/v2/genesis" + "github.com/vechain/thor/v2/internal/datagen" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/muxdb" "github.com/vechain/thor/v2/state" - "github.com/vechain/thor/v2/test/datagen" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/tracers/logger" diff --git a/api/events/events_test.go b/api/events/events_test.go index b1268d378..538c40c68 100644 --- a/api/events/events_test.go +++ b/api/events/events_test.go @@ -17,8 +17,8 @@ import ( "github.com/stretchr/testify/require" "github.com/vechain/thor/v2/api/events" "github.com/vechain/thor/v2/block" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/logdb" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/tx" diff --git a/api/metrics_test.go b/api/metrics_test.go index 9b83a08a6..60f2be359 100644 --- a/api/metrics_test.go +++ b/api/metrics_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "github.com/vechain/thor/v2/api/accounts" "github.com/vechain/thor/v2/api/subscriptions" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/metrics" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/txpool" ) diff --git a/api/node/node_test.go b/api/node/node_test.go index 3dd2e96ee..733bfab17 100644 --- a/api/node/node_test.go +++ b/api/node/node_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/vechain/thor/v2/api/node" "github.com/vechain/thor/v2/comm" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/txpool" ) diff --git a/api/subscriptions/block_reader_test.go b/api/subscriptions/block_reader_test.go index 29a866963..f767c652d 100644 --- a/api/subscriptions/block_reader_test.go +++ b/api/subscriptions/block_reader_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/vechain/thor/v2/genesis" - "github.com/vechain/thor/v2/test/eventcontract" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/eventcontract" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/tx" ) diff --git a/api/subscriptions/subscriptions_test.go b/api/subscriptions/subscriptions_test.go index 8cfb55f7f..af826d604 100644 --- a/api/subscriptions/subscriptions_test.go +++ b/api/subscriptions/subscriptions_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/require" "github.com/vechain/thor/v2/block" "github.com/vechain/thor/v2/genesis" - "github.com/vechain/thor/v2/test/eventcontract" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/eventcontract" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/tx" "github.com/vechain/thor/v2/txpool" diff --git a/api/transactions/transactions_benchmark_test.go b/api/transactions/transactions_benchmark_test.go index f6f1fccd6..d8fc07880 100644 --- a/api/transactions/transactions_benchmark_test.go +++ b/api/transactions/transactions_benchmark_test.go @@ -26,12 +26,12 @@ import ( "github.com/vechain/thor/v2/chain" "github.com/vechain/thor/v2/cmd/thor/solo" "github.com/vechain/thor/v2/genesis" + "github.com/vechain/thor/v2/internal/datagen" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/logdb" "github.com/vechain/thor/v2/muxdb" "github.com/vechain/thor/v2/packer" "github.com/vechain/thor/v2/state" - "github.com/vechain/thor/v2/test/datagen" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/tx" "github.com/vechain/thor/v2/txpool" diff --git a/api/transactions/transactions_test.go b/api/transactions/transactions_test.go index 68c9d535d..a7c97f2c3 100644 --- a/api/transactions/transactions_test.go +++ b/api/transactions/transactions_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/require" "github.com/vechain/thor/v2/api/transactions" "github.com/vechain/thor/v2/genesis" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/tx" diff --git a/api/transfers/transfers_test.go b/api/transfers/transfers_test.go index 04a8c7b42..2e2c79198 100644 --- a/api/transfers/transfers_test.go +++ b/api/transfers/transfers_test.go @@ -19,9 +19,9 @@ import ( "github.com/vechain/thor/v2/api/events" "github.com/vechain/thor/v2/api/transfers" "github.com/vechain/thor/v2/block" + "github.com/vechain/thor/v2/internal/datagen" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/logdb" - "github.com/vechain/thor/v2/test/datagen" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thorclient" "github.com/vechain/thor/v2/tx" ) diff --git a/api/utils/revisions_test.go b/api/utils/revisions_test.go index 12926eaa1..ef7861de2 100644 --- a/api/utils/revisions_test.go +++ b/api/utils/revisions_test.go @@ -13,7 +13,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/vechain/thor/v2/test/testchain" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/thor" ) diff --git a/bft/engine_test.go b/bft/engine_test.go index 54e2e8bec..6b47cedda 100644 --- a/bft/engine_test.go +++ b/bft/engine_test.go @@ -12,10 +12,10 @@ import ( "github.com/vechain/thor/v2/block" "github.com/vechain/thor/v2/chain" "github.com/vechain/thor/v2/genesis" + "github.com/vechain/thor/v2/internal/datagen" "github.com/vechain/thor/v2/muxdb" "github.com/vechain/thor/v2/packer" "github.com/vechain/thor/v2/state" - "github.com/vechain/thor/v2/test/datagen" "github.com/vechain/thor/v2/thor" ) diff --git a/cmd/thor/node/node_benchmark_test.go b/cmd/thor/node/node_benchmark_test.go index 0f6d1f1f0..929a00f66 100644 --- a/cmd/thor/node/node_benchmark_test.go +++ b/cmd/thor/node/node_benchmark_test.go @@ -26,12 +26,12 @@ import ( "github.com/vechain/thor/v2/chain" "github.com/vechain/thor/v2/cmd/thor/solo" "github.com/vechain/thor/v2/genesis" + "github.com/vechain/thor/v2/internal/datagen" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/logdb" "github.com/vechain/thor/v2/muxdb" "github.com/vechain/thor/v2/packer" "github.com/vechain/thor/v2/state" - "github.com/vechain/thor/v2/test/datagen" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/tx" ) diff --git a/cmd/thor/p2p/p2p_test.go b/cmd/thor/p2p/p2p_test.go index 8904cac18..acf98beee 100644 --- a/cmd/thor/p2p/p2p_test.go +++ b/cmd/thor/p2p/p2p_test.go @@ -12,10 +12,9 @@ import ( "testing" "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/vechain/thor/v2/p2psrv" - "github.com/vechain/thor/v2/test/datagen" - "github.com/stretchr/testify/assert" + "github.com/vechain/thor/v2/internal/datagen" + "github.com/vechain/thor/v2/p2psrv" ) func TestNewThorP2P(t *testing.T) { diff --git a/test/datagen/address.go b/internal/datagen/address.go similarity index 100% rename from test/datagen/address.go rename to internal/datagen/address.go diff --git a/test/datagen/hash.go b/internal/datagen/hash.go similarity index 100% rename from test/datagen/hash.go rename to internal/datagen/hash.go diff --git a/test/datagen/net.go b/internal/datagen/net.go similarity index 100% rename from test/datagen/net.go rename to internal/datagen/net.go diff --git a/test/datagen/numbers.go b/internal/datagen/numbers.go similarity index 100% rename from test/datagen/numbers.go rename to internal/datagen/numbers.go diff --git a/test/eventcontract/event_contract.go b/internal/eventcontract/event_contract.go similarity index 100% rename from test/eventcontract/event_contract.go rename to internal/eventcontract/event_contract.go diff --git a/test/testchain/chain.go b/internal/testchain/chain.go similarity index 100% rename from test/testchain/chain.go rename to internal/testchain/chain.go diff --git a/thorclient/api_test.go b/thorclient/api_test.go index e8ae49a8a..3bfc998bb 100644 --- a/thorclient/api_test.go +++ b/thorclient/api_test.go @@ -24,9 +24,9 @@ import ( "github.com/vechain/thor/v2/api/node" "github.com/vechain/thor/v2/comm" "github.com/vechain/thor/v2/genesis" + "github.com/vechain/thor/v2/internal/datagen" + "github.com/vechain/thor/v2/internal/testchain" "github.com/vechain/thor/v2/logdb" - "github.com/vechain/thor/v2/test/datagen" - "github.com/vechain/thor/v2/test/testchain" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/tx" "github.com/vechain/thor/v2/txpool" diff --git a/thorclient/wsclient/client_test.go b/thorclient/wsclient/client_test.go index 72a6d9dbb..2b0f15327 100644 --- a/thorclient/wsclient/client_test.go +++ b/thorclient/wsclient/client_test.go @@ -16,7 +16,7 @@ import ( "github.com/gorilla/websocket" "github.com/stretchr/testify/assert" "github.com/vechain/thor/v2/api/subscriptions" - "github.com/vechain/thor/v2/test/datagen" + "github.com/vechain/thor/v2/internal/datagen" "github.com/vechain/thor/v2/thor" "github.com/vechain/thor/v2/thorclient/common" ) @@ -445,27 +445,3 @@ func TestSubscribeBeats2WithServer(t *testing.T) { t.Log(ev.Data) } } - -func TestSubscriptThorSolo(t *testing.T) { - t.Skip("manual test") - client, err := NewClient("http://localhost:8669") - if err != nil { - t.Fatal(err) - } - - sub, err := client.SubscribeBlocks("") - if err != nil { - t.Fatal(err) - } - - for { - select { - case ev := <-sub.EventChan: - if ev.Error != nil { - t.Fatal(ev.Error) - return - } - t.Log(ev.Data.Obsolete) - } - } -}