It's state, not config.
This commit is contained in:
@@ -28,7 +28,7 @@ func TestGetGlobalConfig_ReturnsWrappedResponse(t *testing.T) {
|
||||
},
|
||||
}
|
||||
data, _ := yaml.Marshal(cfg)
|
||||
storage.WriteFile(filepath.Join(tmpDir, "config.yaml"), data, 0644)
|
||||
storage.WriteFile(filepath.Join(tmpDir, "state.yaml"), data, 0644)
|
||||
|
||||
req := httptest.NewRequest("GET", "/api/v1/config", nil)
|
||||
w := httptest.NewRecorder()
|
||||
@@ -62,8 +62,8 @@ func TestGetGlobalConfig_ReturnsWrappedResponse(t *testing.T) {
|
||||
func TestGetGlobalConfig_EmptyReturnsNotConfigured(t *testing.T) {
|
||||
api, tmpDir := setupTestAPI(t)
|
||||
|
||||
// Remove the default config that EnsureGlobalConfig created
|
||||
os.Remove(filepath.Join(tmpDir, "config.yaml"))
|
||||
// Ensure no state file exists
|
||||
os.Remove(filepath.Join(tmpDir, "state.yaml"))
|
||||
|
||||
req := httptest.NewRequest("GET", "/api/v1/config", nil)
|
||||
w := httptest.NewRecorder()
|
||||
@@ -168,7 +168,7 @@ func TestUpdateGlobalConfig(t *testing.T) {
|
||||
}
|
||||
|
||||
// Verify file was written
|
||||
data, _ := os.ReadFile(filepath.Join(tmpDir, "config.yaml"))
|
||||
data, _ := os.ReadFile(filepath.Join(tmpDir, "state.yaml"))
|
||||
var cfg map[string]any
|
||||
yaml.Unmarshal(data, &cfg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user