mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-10 15:26:38 +08:00
fix media workflows and download organization
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -189,6 +190,20 @@ func TestSchedulerRunNowAsyncRejectsDuplicateRun(t *testing.T) {
|
||||
close(release)
|
||||
}
|
||||
|
||||
func TestSchedulerStartDoesNotRegisterSubscriptionPullJob(t *testing.T) {
|
||||
scheduler := NewSchedulerService(zap.NewNop(), nil, nil, nil, nil, nil, nil, "")
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
cancel()
|
||||
scheduler.Start(ctx)
|
||||
defer scheduler.Stop()
|
||||
|
||||
for _, status := range scheduler.Status() {
|
||||
if strings.Contains(status.Name, "subscription") {
|
||||
t.Fatalf("scheduler registered subscription job %q; subscriptions must be owned by SubscriptionService only", status.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSchedulerOrganizeSourceSyncsVisibilityWhenTargetAlreadyExists(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
src := filepath.Join(root, "downloads")
|
||||
|
||||
Reference in New Issue
Block a user