(t *testing.T)
| 427 | } |
| 428 | |
| 429 | func TestSearchCmd_DoSearch_Integration(t *testing.T) { |
| 430 | // Cleanup. |
| 431 | dirs.RemoveAllForTest() |
| 432 | |
| 433 | // Check error. |
| 434 | var check = func(err error) { |
| 435 | t.Helper() |
| 436 | if err != nil { |
| 437 | t.Fatal(err) |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | // Init celer. |
| 442 | celer := configs.NewCeler() |
| 443 | check(celer.Init()) |
| 444 | check(celer.CloneConf(test_conf_repo_url, test_conf_repo_branch, true)) |
| 445 | check(celer.SetBuildType("Release")) |
| 446 | |
| 447 | // Create search command. |
| 448 | searchCmd := searchCmd{celer: celer} |
| 449 | |
| 450 | // Test doSearch method (integration test). |
| 451 | // This should not panic or exit. |
| 452 | searchCmd.doSearch("zlib*") |
| 453 | |
| 454 | // If we reach here, doSearch completed without fatal errors |
| 455 | } |
| 456 | |
| 457 | func TestSearchCmd_Search_DuplicateResults(t *testing.T) { |
| 458 | // Cleanup. |
nothing calls this directly
no test coverage detected