diff --git a/integration/check_test.go b/integration/check_test.go index e3869fba..173d1788 100644 --- a/integration/check_test.go +++ b/integration/check_test.go @@ -85,6 +85,13 @@ func (s *SkopeoSuite) TestNeedAuthToPrivateRegistryV2WithoutDockerCfg(c *check.C assertSkopeoFails(c, wanted, "--tls-verify=false", "inspect", fmt.Sprintf("docker://%s/busybox:latest", s.regV2WithAuth.url)) } +func (s *SkopeoSuite) TestCertDirInsteadOfCertPath(c *check.C) { + wanted := ".*flag provided but not defined: -cert-path.*" + assertSkopeoFails(c, wanted, "--tls-verify=false", "inspect", fmt.Sprintf("docker://%s/busybox:latest", s.regV2WithAuth.url), "--cert-path=/") + wanted = ".*unauthorized: authentication required.*" + assertSkopeoFails(c, wanted, "--tls-verify=false", "inspect", fmt.Sprintf("docker://%s/busybox:latest", s.regV2WithAuth.url), "--cert-dir=/etc/docker/certs.d/") +} + // TODO(runcom): as soon as we can push to registries ensure you can inspect here // not just get image not found :) func (s *SkopeoSuite) TestNoNeedAuthToPrivateRegistryV2ImageNotFound(c *check.C) {