refactor(test): make sure cli tests are not internal unless they need to be (#1878)

As part of this change searchConfig needed to be exported,
as it was passed as a parameter to exported functions

At this moment most of the tests remaining internal depend on the mock service.
The interface it implements has unexported methods.

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
Andrei Aaron
2023-10-03 21:15:39 +03:00
committed by GitHub
parent 99e29c0f46
commit ca1c3288cf
18 changed files with 3227 additions and 3118 deletions
+8 -8
View File
@@ -20,19 +20,19 @@ import (
test "zotregistry.io/zot/pkg/test/common"
)
func getDefaultSearchConf(baseURL string) searchConfig {
func getDefaultSearchConf(baseURL string) SearchConfig {
verifyTLS := false
debug := false
verbose := true
outputFormat := "text"
return searchConfig{
servURL: baseURL,
resultWriter: io.Discard,
verifyTLS: verifyTLS,
debug: debug,
verbose: verbose,
outputFormat: outputFormat,
return SearchConfig{
ServURL: baseURL,
ResultWriter: io.Discard,
VerifyTLS: verifyTLS,
Debug: debug,
Verbose: verbose,
OutputFormat: outputFormat,
}
}