refactor(config): rename default Garmin token-store dir to .garmin
Shorter, more conventional dotdir name than garmin-tokenstores. Restore the "next to DBPath" join that got dropped when the default was inlined via getEnvDefault -- an explicit GARMIN_TOKENSTORE still wins verbatim, but the implicit default must still resolve relative to the DB file's directory, not the process's CWD. internal/garmin/client.go's GARMIN_TOKENSTORE env var is now always set (TokenStorePath can no longer be empty), so the conditional that only appended it when non-empty is dead code.
This commit is contained in:
@@ -88,7 +88,7 @@ func TestLoad_GarminTokenStoreRootDefaultsNextToDBPath(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Load: %v", err)
|
||||
}
|
||||
want := filepath.Join("/var/lib/geniusrun", "garmin-tokenstores")
|
||||
want := filepath.Join("/var/lib/geniusrun", ".garmin")
|
||||
if cfg.GarminTokenStoreRoot != want {
|
||||
t.Errorf("GarminTokenStoreRoot = %q, want %q", cfg.GarminTokenStoreRoot, want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user