fast exact not done

This commit is contained in:
Bel LaPointe
2022-01-27 13:58:38 -07:00
parent 34fc5fbc5c
commit 99c6c9179a
2 changed files with 112 additions and 9 deletions

32
broker/fastexact_test.go Normal file
View File

@@ -0,0 +1,32 @@
package broker
import (
"local/storage"
"local/truckstop/config"
"testing"
"golang.org/x/time/rate"
)
func TestFastExactLogin(t *testing.T) {
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
fe := NewFastExact().WithMock()
_ = fe
db := storage.NewMap()
if err := fe._login("u", "p", db); err != nil {
t.Fatal(err)
}
}
func TestFastExactSearch(t *testing.T) {
limiter = rate.NewLimiter(rate.Limit(60.0), 1)
fe := NewFastExact().WithMock()
_ = fe
db := storage.NewMap()
_ = db
if jobs, err := fe.search([]config.State{config.State("NC"), config.State("SC")}); err != nil {
t.Fatal(err)
} else {
t.Fatal(jobs)
}
}