MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestEnabledFromConfig_CustomList

Function TestEnabledFromConfig_CustomList

internal/ui/plugins/loader_test.go:24–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestEnabledFromConfig_CustomList(t *testing.T) {
25 cfg := &config.Config{}
26 cfg.SetDefaults()
27
28 cfg.Plugins.Enabled = []string{"unknown", communityscripts.PluginID, communityscripts.PluginID}
29
30 plugins, missing := EnabledFromConfig(cfg)
31
32 require.Equal(t, []string{"unknown"}, missing)
33 require.Len(t, plugins, 1)
34 require.Equal(t, communityscripts.PluginID, plugins[0].ID())
35}
36
37func TestEnabledFromConfig_LegacyAlias(t *testing.T) {
38 cfg := &config.Config{}

Callers

nothing calls this directly

Calls 3

SetDefaultsMethod · 0.95
EnabledFromConfigFunction · 0.85
IDMethod · 0.65

Tested by

no test coverage detected