MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / TestLoadBasePathFromEnv

Function TestLoadBasePathFromEnv

apps/server/internal/config/config_test.go:142–150  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

140}
141
142func TestLoadBasePathFromEnv(t *testing.T) {
143 t.Setenv("ZENNOTES_AUTH_TOKEN", "")
144 t.Setenv("ZENNOTES_CONFIG_PATH", filepath.Join(t.TempDir(), "missing.json"))
145 t.Setenv("ZENNOTES_BASE_PATH", "/zennotes/")
146 cfg := Load()
147 if cfg.BasePath != "/zennotes" {
148 t.Fatalf("BasePath = %q, want /zennotes (trailing slash trimmed)", cfg.BasePath)
149 }
150}
151
152func TestParseFileModeEnv(t *testing.T) {
153 cases := []struct {

Callers

nothing calls this directly

Calls 1

LoadFunction · 0.85

Tested by

no test coverage detected