mirror of
https://github.com/containers/podman.git
synced 2025-08-01 05:54:53 +08:00
enable search tests
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package images
|
package images
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ var (
|
|||||||
Long: searchCmd.Long,
|
Long: searchCmd.Long,
|
||||||
RunE: searchCmd.RunE,
|
RunE: searchCmd.RunE,
|
||||||
Args: searchCmd.Args,
|
Args: searchCmd.Args,
|
||||||
|
Annotations: searchCmd.Annotations,
|
||||||
Example: `podman image search --filter=is-official --limit 3 alpine
|
Example: `podman image search --filter=is-official --limit 3 alpine
|
||||||
podman image search registry.fedoraproject.org/ # only works with v2 registries
|
podman image search registry.fedoraproject.org/ # only works with v2 registries
|
||||||
podman image search --format "table {{.Index}} {{.Name}}" registry.fedoraproject.org/fedora`,
|
podman image search --format "table {{.Index}} {{.Name}}" registry.fedoraproject.org/fedora`,
|
||||||
@ -108,7 +110,13 @@ func imageSearch(cmd *cobra.Command, args []string) error {
|
|||||||
// which is important to implement a sane way of dealing with defaults of
|
// which is important to implement a sane way of dealing with defaults of
|
||||||
// boolean CLI flags.
|
// boolean CLI flags.
|
||||||
if cmd.Flags().Changed("tls-verify") {
|
if cmd.Flags().Changed("tls-verify") {
|
||||||
searchOptions.SkipTLSVerify = types.NewOptionalBool(!pullOptions.TLSVerifyCLI)
|
searchOptions.SkipTLSVerify = types.NewOptionalBool(!searchOptions.TLSVerifyCLI)
|
||||||
|
}
|
||||||
|
|
||||||
|
if searchOptions.Authfile != "" {
|
||||||
|
if _, err := os.Stat(searchOptions.Authfile); err != nil {
|
||||||
|
return errors.Wrapf(err, "error getting authfile %s", searchOptions.Authfile)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
searchReport, err := registry.ImageEngine().Search(registry.GetContext(), searchTerm, searchOptions.ImageSearchOptions)
|
searchReport, err := registry.ImageEngine().Search(registry.GetContext(), searchTerm, searchOptions.ImageSearchOptions)
|
||||||
|
@ -68,7 +68,6 @@ registries = ['{{.Host}}:{{.Port}}']`
|
|||||||
registryFileTwoTmpl := template.Must(template.New("registryFileTwo").Parse(regFileContents2))
|
registryFileTwoTmpl := template.Must(template.New("registryFileTwo").Parse(regFileContents2))
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
Skip(v2fail)
|
|
||||||
tempdir, err = CreateTempDirInTempDir()
|
tempdir, err = CreateTempDirInTempDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Reference in New Issue
Block a user