MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestSearchCmd_DoSearch_Integration

Function TestSearchCmd_DoSearch_Integration

cmds/cmd_search_test.go:429–455  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

427}
428
429func 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
457func TestSearchCmd_Search_DuplicateResults(t *testing.T) {
458 // Cleanup.

Callers

nothing calls this directly

Calls 7

InitMethod · 0.95
CloneConfMethod · 0.95
SetBuildTypeMethod · 0.95
doSearchMethod · 0.95
RemoveAllForTestFunction · 0.92
NewCelerFunction · 0.92
checkFunction · 0.85

Tested by

no test coverage detected