on main help sign in
chore: isolate store test
df3a04dKieran Klukas
internal/config/store_test.go+7−2
@@ -318,11 +318,16 @@ func TestConfigStaleness_RefreshClearsDirtyState(t *testing.T) {
318// ReloadFromDisk updates store state BEFORE running model/agent setup,
318// ReloadFromDisk updates store state BEFORE running model/agent setup,
319// so the new config values are used rather than stale pre-reload values.
319// so the new config values are used rather than stale pre-reload values.
320func TestReloadFromDisk_UsesNewConfigValues(t *testing.T) {
320func TestReloadFromDisk_UsesNewConfigValues(t *testing.T) {
321− t.Parallel()
322−
323 dir := t.TempDir()
321 dir := t.TempDir()
324 configPath := filepath.Join(dir, "crush.json")
322 configPath := filepath.Join(dir, "crush.json")
325
323
324+ // Isolate from the host's global config so only test-provided
325+ // providers are visible.
326+ t.Setenv("CRUSH_GLOBAL_CONFIG", dir)
327+ t.Setenv("CRUSH_GLOBAL_DATA", dir)
328+ resetProviderState()
329+ t.Cleanup(resetProviderState)
330+
326 // Create initial config with one model preference
331 // Create initial config with one model preference
327 initialConfig := `{
332 initialConfig := `{
328 "models": {
333 "models": {