Files
silo-server/internal/config/restart_keys_test.go
T
5afe56cfc0 feat(jellycompat): add runtime-managed Jellyfin Web compatibility (#77)
* feat(jellycompat): install web assets at runtime

* fix(jellycompat): recover stale web operation locks

* fix(jellycompat): harden web component management

* feat(admin): refine compat settings and restart status

* chore(dev): add hot-reload docker compose stack

* fix(dev): include npm in hot-reload backend

* feat(admin): refine Jellyfin compatibility settings

* feat(settings): improve jellyfin proxy summary

* feat(settings): improve jellyfin web controls

* fix(settings): update jellyfin web removal status

* fix(settings): enable jellyfin web after install

* feat(jellycompat): auto-select web ui version

* test(api): update rate limit handler setup

* feat(jellycompat): refine web ui install onboarding

* fix(jellycompat): address web ui install review issues

* fix(onboarding): mirror jellyfin api runtime status

* fix(admin): remove global restart banner

* fix(settings): gate restart required tracking

* fix(jellyfin): ignore live settings for restart status

* fix(jellyfin): avoid restart for live compat settings

* fix(subtitles): normalize AI language codes

* fix(catalog): support partial title search tokens

* feat(branding): add white-label customization

* Add push relay engineering plan

- Document relay API contracts, APNs/FCM behavior, auth, storage, and ops
- Capture implementation plan, provider references, decisions, and README

---------

Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
2026-06-15 09:34:08 -04:00

56 lines
1.8 KiB
Go

package config
import "testing"
func TestRestartRequired(t *testing.T) {
cases := []struct {
key string
want bool
}{
// Explicit infrastructure keys.
{"server.listen", true},
{"auth.jwt_secret", true},
{"ratelimit.backend", true},
// Prefix-covered namespaces.
{"database.max_connections", true},
{"userdb.backend", true},
{"s3.public_endpoint", true},
{"redis.url", true},
{"recommendations.enabled", true},
// Legacy AI aliases classify like their canonical keys.
{"subtitle_ai.max_concurrent_jobs", true},
// Compat listeners and session stores are only bound at process startup.
{"jellyfin_compat.enabled", true},
{"jellyfin_compat.listen", true},
{"jellyfin_compat.server_id", true},
{"jellyfin_compat.session_ttl", true},
{"jellyfin_compat.playback_session_ttl", true},
// Jellyfin identity and Web UI settings are live-read.
{"jellyfin_compat.public_url", false},
{"jellyfin_compat.server_name", false},
{"jellyfin_compat.emulated_server_version", false},
{"jellyfin_compat.web_enabled", false},
{"jellyfin_compat.web_version", false},
{"jellyfin_compat.web_dir", false},
{"jellyfin_compat.web_install_dir", false},
{"subtitle_ai.base_url", false}, // like ai.base_url — hot-reloaded
{"ai.api_key", false},
{"subtitle_ai.enabled", false},
{"metadata_ai.on_view", false},
// Live settings read from the settings repo per request.
{"branding.server_name", false},
{"overlays.enabled", false},
{"markers.mode", false},
{"download.enabled", false},
{"allow_4k_transcode", false},
{"defaults.card_overlays", false},
// Unknown keys default to live.
{"some.future_setting", false},
}
for _, tc := range cases {
if got := RestartRequired(tc.key); got != tc.want {
t.Errorf("RestartRequired(%q) = %v, want %v", tc.key, got, tc.want)
}
}
}