mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
refactor(cli): added equivalent subcommands for each flag combination under every command (#1674)
- image command is now deprecated in favor of 'images' - cve command is now deprecated in favor of 'cves' Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
@@ -5,6 +5,8 @@ const (
|
||||
ExtCatalogPrefix = "/_catalog"
|
||||
ExtOciDiscoverPrefix = "/_oci/ext/discover"
|
||||
|
||||
BaseExtension = "_zot"
|
||||
|
||||
// zot specific extensions.
|
||||
BasePrefix = "/_zot"
|
||||
ExtPrefix = BasePrefix + "/ext"
|
||||
|
||||
@@ -8491,7 +8491,7 @@ func TestDistSpecExtensions(t *testing.T) {
|
||||
t.Log(extensionList.Extensions)
|
||||
So(len(extensionList.Extensions), ShouldEqual, 1)
|
||||
So(len(extensionList.Extensions[0].Endpoints), ShouldEqual, 5)
|
||||
So(extensionList.Extensions[0].Name, ShouldEqual, "_zot")
|
||||
So(extensionList.Extensions[0].Name, ShouldEqual, constants.BaseExtension)
|
||||
So(extensionList.Extensions[0].URL, ShouldContainSubstring, "_zot.md")
|
||||
So(extensionList.Extensions[0].Description, ShouldNotBeEmpty)
|
||||
// Verify the endpoints below are enabled by search
|
||||
@@ -8539,7 +8539,7 @@ func TestDistSpecExtensions(t *testing.T) {
|
||||
t.Log(extensionList.Extensions)
|
||||
So(len(extensionList.Extensions), ShouldEqual, 1)
|
||||
So(len(extensionList.Extensions[0].Endpoints), ShouldEqual, 2)
|
||||
So(extensionList.Extensions[0].Name, ShouldEqual, "_zot")
|
||||
So(extensionList.Extensions[0].Name, ShouldEqual, constants.BaseExtension)
|
||||
So(extensionList.Extensions[0].URL, ShouldContainSubstring, "_zot.md")
|
||||
So(extensionList.Extensions[0].Description, ShouldNotBeEmpty)
|
||||
// Verify the endpoints below are enabled by search
|
||||
|
||||
+1
-1
@@ -717,7 +717,7 @@ func (rh *RouteHandler) UpdateManifest(response http.ResponseWriter, request *ht
|
||||
rh.c.Log.Error().Err(err).Msg("unexpected error: performing cleanup")
|
||||
|
||||
if err = imgStore.DeleteImageManifest(name, reference, false); err != nil {
|
||||
// deletion of image manifest is important, but not critical for image repo consistancy
|
||||
// deletion of image manifest is important, but not critical for image repo consistency
|
||||
// in the worst scenario a partial manifest file written to disk will not affect the repo because
|
||||
// the new manifest was not added to "index.json" file (it is possible that GC will take care of it)
|
||||
rh.c.Log.Error().Err(err).Str("repository", name).Str("reference", reference).
|
||||
|
||||
Reference in New Issue
Block a user