Skip to content

Commit 539d45c

Browse files
author
samshi
committed
feat: update testcase
1 parent f3ccc8e commit 539d45c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

schedule/schedule_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ import (
1616
)
1717

1818
var testArgs = Args{
19-
Cluster: &mockCluster{},
20-
BotAppID: 12345,
21-
BotToken: "Bot appid.token",
22-
Intent: dto.IntentGuildAtMessage,
19+
Cluster: &mockCluster{},
20+
BotAppID: 12345,
21+
BotToken: "Bot appid.token",
22+
Intent: dto.IntentGuildAtMessage,
23+
WatchInterval: time.Minute,
2324
}
2425

2526
var testScheduler = &Scheduler{
26-
args: testArgs,
27+
args: &testArgs,
2728
sessionCtx: nil,
2829
localInstance: &mockInstance{name: "127.0.0.1"},
2930
}
@@ -32,7 +33,7 @@ type mockCluster struct {
3233
}
3334

3435
// RegInstance 注册本地实例
35-
func (m *mockCluster) RegInstance(ctx context.Context) (base.Instance, error) {
36+
func (m *mockCluster) RegInstance(ctx context.Context, name string) (base.Instance, error) {
3637
return nil, nil
3738
}
3839

0 commit comments

Comments
 (0)