fast exact not done
This commit is contained in:
32
broker/fastexact_test.go
Normal file
32
broker/fastexact_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user