mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 23:56:37 +08:00
refactor(drivers): decouple inproc cron from inproc worker and satisfy linter
This commit is contained in:
@@ -14,17 +14,11 @@ import (
|
||||
|
||||
"Wavelet/core"
|
||||
"Wavelet/plugins/drivers/driver_inproc_cron"
|
||||
"Wavelet/plugins/drivers/driver_inproc_worker"
|
||||
)
|
||||
|
||||
func TestInprocCronPlugin(t *testing.T) {
|
||||
ctx := core.NewContext(context.Background())
|
||||
|
||||
workerPlugin := driver_inproc_worker.New()
|
||||
require.NoError(t, workerPlugin.Apply(ctx))
|
||||
require.NoError(t, workerPlugin.Start(context.Background()))
|
||||
defer func() { _ = workerPlugin.Stop(context.Background()) }()
|
||||
|
||||
cronPlugin := driver_inproc_cron.New()
|
||||
assert.Equal(t, "driver_inproc_cron", cronPlugin.Name())
|
||||
assert.Equal(t, core.DriverTypeScheduler, cronPlugin.Type())
|
||||
|
||||
Reference in New Issue
Block a user