mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
fix api test case failure
Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
a8fd071fa7
commit
38395e015c
@ -19,6 +19,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -311,6 +312,12 @@ func (ra *RepositoryAPI) Delete() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err = rc.DeleteManifest(digests[t]); err != nil {
|
if err = rc.DeleteManifest(digests[t]); err != nil {
|
||||||
|
if regErr, ok := err.(*commonhttp.Error); ok {
|
||||||
|
if regErr.Code == http.StatusNotFound {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ra.ParseAndHandleError(fmt.Sprintf("failed to delete tag %s", t), err)
|
ra.ParseAndHandleError(fmt.Sprintf("failed to delete tag %s", t), err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user