fix issue

Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
stonezdj 2020-12-17 16:33:17 +08:00
parent 918fe125b7
commit e6f80259f7
2 changed files with 5 additions and 5 deletions

View File

@ -171,15 +171,15 @@ func (c *clientTestSuite) TestManifestExist() {
client := NewClient(server.URL, "", "", true)
// doesn't exist
exist, digest, err := client.ManifestExist("library/alpine", "latest")
exist, desc, err := client.ManifestExist("library/alpine", "latest")
c.Require().Nil(err)
c.False(exist)
// exist
exist, digest, err = client.ManifestExist("library/hello-world", "latest")
exist, desc, err = client.ManifestExist("library/hello-world", "latest")
c.Require().Nil(err)
c.True(exist)
c.Equal("digest", digest)
c.Equal("digest", string(desc.Digest))
}
func (c *clientTestSuite) TestPullManifest() {

View File

@ -44,7 +44,7 @@ func TestAdapter_FetchArtifacts(t *testing.T) {
}
func TestAdapter_ManifestExist(t *testing.T) {
exist, digest, err := HWAdapter.ManifestExist("", "")
exist, desc, err := HWAdapter.ManifestExist("", "")
if err != nil {
if strings.HasPrefix(err.Error(), "[401]") {
t.Log("huawei ak/sk is not available", err.Error())
@ -53,7 +53,7 @@ func TestAdapter_ManifestExist(t *testing.T) {
}
} else {
if exist {
t.Log(digest)
t.Log(desc.Digest)
}
}
}