try suppressing logs but we
parent
a742433a56
commit
5742a215b1
|
|
@ -3,6 +3,7 @@ package broker
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"local/storage"
|
"local/storage"
|
||||||
|
"local/truckstop/logtr"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
@ -14,6 +15,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBrokerInterface(t *testing.T) {
|
func TestBrokerInterface(t *testing.T) {
|
||||||
|
logtr.SetLevel(logtr.SOS)
|
||||||
var b Broker
|
var b Broker
|
||||||
b = FastExact{}
|
b = FastExact{}
|
||||||
b = NTGVision{}
|
b = NTGVision{}
|
||||||
|
|
@ -21,6 +23,7 @@ func TestBrokerInterface(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDoCookies(t *testing.T) {
|
func TestDoCookies(t *testing.T) {
|
||||||
|
logtr.SetLevel(logtr.SOS)
|
||||||
limiter = rate.NewLimiter(rate.Limit(20.0), 1)
|
limiter = rate.NewLimiter(rate.Limit(20.0), 1)
|
||||||
calls := 0
|
calls := 0
|
||||||
db := storage.NewMap()
|
db := storage.NewMap()
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ type FastExact struct {
|
||||||
func NewFastExact() FastExact {
|
func NewFastExact() FastExact {
|
||||||
fe := FastExact{}
|
fe := FastExact{}
|
||||||
fe.doer = fe
|
fe.doer = fe
|
||||||
|
if config.Get().Brokers.FastExact.Mock {
|
||||||
|
fe = fe.WithMock()
|
||||||
|
}
|
||||||
return fe
|
return fe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package broker
|
||||||
import (
|
import (
|
||||||
"local/storage"
|
"local/storage"
|
||||||
"local/truckstop/config"
|
"local/truckstop/config"
|
||||||
|
"local/truckstop/logtr"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -45,6 +46,7 @@ func TestFastExactReal(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFastExactLogin(t *testing.T) {
|
func TestFastExactLogin(t *testing.T) {
|
||||||
|
logtr.SetLevel(logtr.SOS)
|
||||||
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
|
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
|
||||||
fe := NewFastExact().WithMock()
|
fe := NewFastExact().WithMock()
|
||||||
_ = fe
|
_ = fe
|
||||||
|
|
@ -55,6 +57,7 @@ func TestFastExactLogin(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFastExactSearch(t *testing.T) {
|
func TestFastExactSearch(t *testing.T) {
|
||||||
|
logtr.SetLevel(logtr.SOS)
|
||||||
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
|
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
|
||||||
fe := NewFastExact().WithMock()
|
fe := NewFastExact().WithMock()
|
||||||
_ = fe
|
_ = fe
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue