feat: 完善代理池与抢购链路,发布 0.5.0
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package app
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestEarlyFrontendCallsAreSafeBeforeSchedulerReady(t *testing.T) {
|
||||
app := &App{}
|
||||
if got := app.GetAccounts(); len(got) != 0 {
|
||||
t.Fatalf("GetAccounts()=%v, want empty before scheduler init", got)
|
||||
}
|
||||
if got := app.GetSeckillStatus(); got.Success {
|
||||
t.Fatal("GetSeckillStatus() should report not running before scheduler init")
|
||||
}
|
||||
if got := app.GetTime(); got.Source != "localFallback" {
|
||||
t.Fatalf("GetTime().Source=%q, want localFallback", got.Source)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user