MCPcopy Create free account
hub / github.com/buggregator/server / TestModulesFromCSV

Function TestModulesFromCSV

internal/app/config_test.go:71–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestModulesFromCSV(t *testing.T) {
72 cfg := modulesFromCSV("sentry,ray,profiler")
73
74 if !cfg.IsEnabled("sentry") {
75 t.Error("sentry should be enabled")
76 }
77 if !cfg.IsEnabled("ray") {
78 t.Error("ray should be enabled")
79 }
80 if !cfg.IsEnabled("profiler") {
81 t.Error("profiler should be enabled")
82 }
83
84 // Types not in CSV should be disabled
85 if cfg.IsEnabled("smtp") {
86 t.Error("smtp should be disabled")
87 }
88 if cfg.IsEnabled("sms") {
89 t.Error("sms should be disabled")
90 }
91 if cfg.IsEnabled("monolog") {
92 t.Error("monolog should be disabled")
93 }
94}
95
96func TestExpandEnvVars(t *testing.T) {
97 t.Setenv("TEST_VAR", "hello")

Callers

nothing calls this directly

Calls 2

modulesFromCSVFunction · 0.85
IsEnabledMethod · 0.80

Tested by

no test coverage detected