btcd/integration
Calvin Kim f8ce7a7da8 rpctest: scope shared state to the current process
Two pieces of rpctest's global state silently aliased across concurrent
test processes (which is what `go test ./...` does by default, so any
`make unit` that exercises -tags=rpctest hit this):

- btcdExecutablePath compiled to a fixed path /tmp/btcd/rpctest/btcd.
  Two `go build` invocations would race on the same file, occasionally
  yielding a truncated or stale binary and downstream "tls: certificate
  signed by unknown authority" failures when the harness tried to talk
  to the resulting node.

- lastPort started at the same defaultNodePort in every process. The
  bind-test in NextAvailablePort closes the listener before returning,
  so two processes climbing from the same base would frequently hand
  out the same port and one harness would die with "connection refused"
  when btcd failed to bind.

Suffix the executable with a random uint32 and seed lastPort with a
random offset into a 50k-port window so each process climbs through
its own range.
2026-05-30 17:49:55 +09:00
..
rpctest rpctest: scope shared state to the current process 2026-05-30 17:49:55 +09:00
bip0009_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
chain_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
csv_fork_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
getchaintips_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
invalidate_reconsider_block_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
log.go integration: print logs to console 2024-01-15 17:22:42 +08:00
main.go integration: Initial implementation. 2016-10-25 14:36:23 -05:00
p2a_test.go integration: fix p2a_test build under -tags=rpctest 2026-05-30 16:47:18 +09:00
prune_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
rawtx_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
README.md docs: update shields 2021-03-05 07:45:19 -05:00
reorg_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
rpcserver_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00
sync_race_test.go multi: use new v2 modules everywhere 2026-05-14 18:05:33 -07:00

integration

Build Status ISC License

This contains integration tests which make use of the rpctest package to programmatically drive nodes via RPC.

License

This code is licensed under the copyfree ISC License.