(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func TestLoadProject_InvalidComposeFile(t *testing.T) { |
| 290 | tmpDir := t.TempDir() |
| 291 | composeFile := filepath.Join(tmpDir, "compose.yaml") |
| 292 | composeContent := ` |
| 293 | this is not valid yaml: [[[ |
| 294 | ` |
| 295 | err := os.WriteFile(composeFile, []byte(composeContent), 0o644) |
| 296 | assert.NilError(t, err) |
| 297 | |
| 298 | service, err := NewComposeService(nil) |
| 299 | assert.NilError(t, err) |
| 300 | |
| 301 | // Should return an error for invalid YAML |
| 302 | project, err := service.LoadProject(t.Context(), api.ProjectLoadOptions{ |
| 303 | ConfigPaths: []string{composeFile}, |
| 304 | }) |
| 305 | |
| 306 | assert.Assert(t, err != nil) |
| 307 | assert.Assert(t, project == nil) |
| 308 | } |
| 309 | |
| 310 | func TestLoadProject_MissingComposeFile(t *testing.T) { |
| 311 | service, err := NewComposeService(nil) |
nothing calls this directly
no test coverage detected