Skip long light/provider/http tests in -short mode

I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of light/provider/http from about 20s to about 0.3s.
This commit is contained in:
Mark Rushakoff
2022-07-22 11:59:12 -04:00
parent 6daef21b52
commit 9918b6e89f

View File

@@ -33,6 +33,10 @@ func TestNewProvider(t *testing.T) {
}
func TestProvider(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
cfg, err := rpctest.CreateConfig(t, t.Name())