diff options
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/login.go | 3 | ||||
-rw-r--r-- | cmd/podman/spec.go | 2 | ||||
-rw-r--r-- | cmd/podman/spec_test.go | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/cmd/podman/login.go b/cmd/podman/login.go index 325bf8621..f57f34532 100644 --- a/cmd/podman/login.go +++ b/cmd/podman/login.go @@ -5,7 +5,6 @@ import ( "context" "fmt" "os" - "path/filepath" "strings" "github.com/containers/image/docker" @@ -75,7 +74,7 @@ func loginCmd(c *cli.Context) error { } sc.DockerInsecureSkipTLSVerify = !c.BoolT("tls-verify") if c.String("cert-dir") != "" { - sc.DockerCertPath = filepath.Join(c.String("cert-dir"), server) + sc.DockerCertPath = c.String("cert-dir") } if err = docker.CheckAuth(context.TODO(), sc, username, password, server); err == nil { diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go index 0b5a3c3e3..a14bd7dfb 100644 --- a/cmd/podman/spec.go +++ b/cmd/podman/spec.go @@ -439,7 +439,7 @@ func getDefaultAnnotations() map[string]string { annotations[ann.Annotations] = "" annotations[ann.ContainerID] = "" annotations[ann.ContainerName] = "" - annotations[ann.ContainerType] = "" + annotations[ann.ContainerType] = "sandbox" annotations[ann.Created] = "" annotations[ann.HostName] = "" annotations[ann.IP] = "" diff --git a/cmd/podman/spec_test.go b/cmd/podman/spec_test.go index 586c09656..768b079aa 100644 --- a/cmd/podman/spec_test.go +++ b/cmd/podman/spec_test.go @@ -23,6 +23,12 @@ func TestCreateConfig_GetVolumeMounts(t *testing.T) { assert.True(t, reflect.DeepEqual(data, specMount[0])) } +func TestCreateConfig_GetAnnotations(t *testing.T) { + config := createConfig{} + annotations := config.GetAnnotations() + assert.True(t, reflect.DeepEqual("sandbox", annotations["io.kubernetes.cri-o.ContainerType"])) +} + func TestCreateConfig_GetTmpfsMounts(t *testing.T) { data := spec.Mount{ Destination: "/homer", |