lntest: allow the main test files to be buildable w/o the rpctest build tag

In this commit, we modify our build tag set up to allow the main test
files to be buildable w/o the current rpctest tag. We do this so that
those of us that use extensions which will compile live files like
vim-go can once again fix compile errors as we go in our editors.

In order to do this, we now make an external `testsCases` variable, and
have two variants: one that's empty (no build tag), and one that's fully
populated with all our tests (build tag active). As a result, the main
file will now always build regardless of if the build tag is active or
not, but we'll only actually execute tests if the `testCases` variable
has been populated.

As sample run w/ the tag off:
```
=== RUN   TestLightningNetworkDaemon
--- PASS: TestLightningNetworkDaemon (0.00s)
PASS
ok  	github.com/lightningnetwork/lnd/lntest/itest	0.051s
```
This commit is contained in:
Olaoluwa Osuntokun
2020-01-10 15:27:48 +01:00
committed by Oliver Gugger
parent acd615aca4
commit c769247198
25 changed files with 456 additions and 485 deletions

View File

@@ -1,5 +1,3 @@
// +build rpctest
package itest
import (