try suppressing logs but we

master
Bel LaPointe 2022-01-27 15:24:04 -07:00
parent a742433a56
commit 5742a215b1
3 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package broker
import (
"fmt"
"local/storage"
"local/truckstop/logtr"
"net/http"
"net/http/httptest"
"strconv"
@ -14,6 +15,7 @@ import (
)
func TestBrokerInterface(t *testing.T) {
logtr.SetLevel(logtr.SOS)
var b Broker
b = FastExact{}
b = NTGVision{}
@ -21,6 +23,7 @@ func TestBrokerInterface(t *testing.T) {
}
func TestDoCookies(t *testing.T) {
logtr.SetLevel(logtr.SOS)
limiter = rate.NewLimiter(rate.Limit(20.0), 1)
calls := 0
db := storage.NewMap()

View File

@ -27,6 +27,9 @@ type FastExact struct {
func NewFastExact() FastExact {
fe := FastExact{}
fe.doer = fe
if config.Get().Brokers.FastExact.Mock {
fe = fe.WithMock()
}
return fe
}

View File

@ -3,6 +3,7 @@ package broker
import (
"local/storage"
"local/truckstop/config"
"local/truckstop/logtr"
"os"
"path"
"testing"
@ -45,6 +46,7 @@ func TestFastExactReal(t *testing.T) {
}
func TestFastExactLogin(t *testing.T) {
logtr.SetLevel(logtr.SOS)
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
fe := NewFastExact().WithMock()
_ = fe
@ -55,6 +57,7 @@ func TestFastExactLogin(t *testing.T) {
}
func TestFastExactSearch(t *testing.T) {
logtr.SetLevel(logtr.SOS)
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
fe := NewFastExact().WithMock()
_ = fe