mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-07 13:56:37 +08:00
fix cloud library mounts and artwork caching
This commit is contained in:
@@ -168,6 +168,24 @@ func TestStorageConfigOpenListHTTPSAgainstHTTPHint(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestStorageConfigCloudProviderRejectsDisabledConfig(t *testing.T) {
|
||||
_, storage := newStorageUploadTestService(t)
|
||||
enabled := false
|
||||
if _, err := storage.Save(t.Context(), StorageInput{
|
||||
Type: "openlist",
|
||||
Config: map[string]any{
|
||||
"url": "http://127.0.0.1:5244/dav",
|
||||
},
|
||||
Enabled: &enabled,
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, err := storage.CloudProvider(t.Context(), "openlist")
|
||||
if err == nil || !strings.Contains(err.Error(), "disabled") {
|
||||
t.Fatalf("disabled provider error = %v, want disabled", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSchedulerCloudUploadUsesConfiguredLocalSource(t *testing.T) {
|
||||
var uploaded []string
|
||||
alist := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user