From 1ae306021e323ae11c71ffb8546fbd9019e6cb6f Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 26 Oct 2016 11:55:49 -0500 Subject: [PATCH] rpctest: Make subpackage of integration. This makes the rpctest package a subpackage of the integration package since its primary purpose is for integration testing. --- blockchain/chain_test.go | 2 +- integration/README.md | 4 +- integration/bip0009_test.go | 2 +- integration/csv_fork_test.go | 2 +- integration/rpcserver_test.go | 2 +- {rpctest => integration/rpctest}/README.md | 66 +++++++++---------- {rpctest => integration/rpctest}/blockgen.go | 0 {rpctest => integration/rpctest}/doc.go | 0 {rpctest => integration/rpctest}/memwallet.go | 0 {rpctest => integration/rpctest}/node.go | 0 .../rpctest}/rpc_harness.go | 0 .../rpctest}/rpc_harness_test.go | 0 {rpctest => integration/rpctest}/utils.go | 0 13 files changed, 39 insertions(+), 39 deletions(-) rename {rpctest => integration/rpctest}/README.md (84%) rename {rpctest => integration/rpctest}/blockgen.go (100%) rename {rpctest => integration/rpctest}/doc.go (100%) rename {rpctest => integration/rpctest}/memwallet.go (100%) rename {rpctest => integration/rpctest}/node.go (100%) rename {rpctest => integration/rpctest}/rpc_harness.go (100%) rename {rpctest => integration/rpctest}/rpc_harness_test.go (100%) rename {rpctest => integration/rpctest}/utils.go (100%) diff --git a/blockchain/chain_test.go b/blockchain/chain_test.go index 3bd4bc3b5..a4542fcc9 100644 --- a/blockchain/chain_test.go +++ b/blockchain/chain_test.go @@ -13,7 +13,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/rpctest" + "github.com/btcsuite/btcd/integration/rpctest" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" ) diff --git a/integration/README.md b/integration/README.md index 44fc5a6b7..cf895ff94 100644 --- a/integration/README.md +++ b/integration/README.md @@ -6,8 +6,8 @@ integration (http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) This contains integration tests which make use of the -[rpctest](https://github.com/btcsuite/btcd/tree/master/rpctest) package to -programmatically drive nodes via RPC. +[rpctest](https://github.com/btcsuite/btcd/tree/master/integration/rpctest) +package to programmatically drive nodes via RPC. ## License diff --git a/integration/bip0009_test.go b/integration/bip0009_test.go index 9e7c8d2b9..46a7f9699 100644 --- a/integration/bip0009_test.go +++ b/integration/bip0009_test.go @@ -16,7 +16,7 @@ import ( "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/rpctest" + "github.com/btcsuite/btcd/integration/rpctest" ) const ( diff --git a/integration/csv_fork_test.go b/integration/csv_fork_test.go index 086d15a98..d7da7be7d 100644 --- a/integration/csv_fork_test.go +++ b/integration/csv_fork_test.go @@ -18,7 +18,7 @@ import ( "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/rpctest" + "github.com/btcsuite/btcd/integration/rpctest" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" diff --git a/integration/rpcserver_test.go b/integration/rpcserver_test.go index 3e8a6bf16..df526442b 100644 --- a/integration/rpcserver_test.go +++ b/integration/rpcserver_test.go @@ -15,7 +15,7 @@ import ( "testing" "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/rpctest" + "github.com/btcsuite/btcd/integration/rpctest" ) func testGetBestBlock(r *rpctest.Harness, t *testing.T) { diff --git a/rpctest/README.md b/integration/rpctest/README.md similarity index 84% rename from rpctest/README.md rename to integration/rpctest/README.md index bc6e35477..3b8f46aa7 100644 --- a/rpctest/README.md +++ b/integration/rpctest/README.md @@ -1,33 +1,33 @@ -rpctest -======= - -[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)] -(https://travis-ci.org/btcsuite/btcd) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/btcsuite/btcd/rpctest) - -Package rpctest provides a btcd-specific RPC testing harness crafting and -executing integration tests by driving a `btcd` instance via the `RPC` -interface. Each instance of an active harness comes equipped with a simple -in-memory HD wallet capable of properly syncing to the generated chain, -creating new addresses, and crafting fully signed transactions paying to an -arbitrary set of outputs. - -This package was designed specifically to act as an RPC testing harness for -`btcd`. However, the constructs presented are general enough to be adapted to -any project wishing to programmatically drive a `btcd` instance of its -systems/integration tests. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcd/rpctest -``` - -## License - - -Package rpctest is licensed under the [copyfree](http://copyfree.org) ISC -License. - +rpctest +======= + +[![Build Status](http://img.shields.io/travis/btcsuite/btcd.svg)] +(https://travis-ci.org/btcsuite/btcd) [![ISC License] +(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) +[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] +(http://godoc.org/github.com/btcsuite/btcd/integration/rpctest) + +Package rpctest provides a btcd-specific RPC testing harness crafting and +executing integration tests by driving a `btcd` instance via the `RPC` +interface. Each instance of an active harness comes equipped with a simple +in-memory HD wallet capable of properly syncing to the generated chain, +creating new addresses, and crafting fully signed transactions paying to an +arbitrary set of outputs. + +This package was designed specifically to act as an RPC testing harness for +`btcd`. However, the constructs presented are general enough to be adapted to +any project wishing to programmatically drive a `btcd` instance of its +systems/integration tests. + +## Installation and Updating + +```bash +$ go get -u github.com/btcsuite/btcd/integration/rpctest +``` + +## License + + +Package rpctest is licensed under the [copyfree](http://copyfree.org) ISC +License. + diff --git a/rpctest/blockgen.go b/integration/rpctest/blockgen.go similarity index 100% rename from rpctest/blockgen.go rename to integration/rpctest/blockgen.go diff --git a/rpctest/doc.go b/integration/rpctest/doc.go similarity index 100% rename from rpctest/doc.go rename to integration/rpctest/doc.go diff --git a/rpctest/memwallet.go b/integration/rpctest/memwallet.go similarity index 100% rename from rpctest/memwallet.go rename to integration/rpctest/memwallet.go diff --git a/rpctest/node.go b/integration/rpctest/node.go similarity index 100% rename from rpctest/node.go rename to integration/rpctest/node.go diff --git a/rpctest/rpc_harness.go b/integration/rpctest/rpc_harness.go similarity index 100% rename from rpctest/rpc_harness.go rename to integration/rpctest/rpc_harness.go diff --git a/rpctest/rpc_harness_test.go b/integration/rpctest/rpc_harness_test.go similarity index 100% rename from rpctest/rpc_harness_test.go rename to integration/rpctest/rpc_harness_test.go diff --git a/rpctest/utils.go b/integration/rpctest/utils.go similarity index 100% rename from rpctest/utils.go rename to integration/rpctest/utils.go