diff --git a/cmd/oras/root/manifest/index/create.go b/cmd/oras/root/manifest/index/create.go index 8fc6d20a6..4ae8ca2b9 100644 --- a/cmd/oras/root/manifest/index/create.go +++ b/cmd/oras/root/manifest/index/create.go @@ -77,6 +77,7 @@ Example - create an index and push it with multiple tags: opts.sources = args[1:] return option.Parse(cmd, &opts) }, + Aliases: []string{"pack"}, RunE: func(cmd *cobra.Command, args []string) error { return createIndex(cmd, opts) }, diff --git a/test/e2e/suite/command/manifest_index.go b/test/e2e/suite/command/manifest_index.go index fca870bf7..f5450e88f 100644 --- a/test/e2e/suite/command/manifest_index.go +++ b/test/e2e/suite/command/manifest_index.go @@ -26,8 +26,8 @@ import ( var _ = Describe("ORAS beginners:", func() { When("running manifest index command", func() { When("running `manifest index create`", func() { - It("should show help doc with feature flags", func() { - ORAS("manifest", "index", "create", "--help").MatchKeyWords(ExampleDesc).Exec() + It("should show help doc with alias", func() { + ORAS("manifest", "index", "create", "--help").MatchKeyWords("Aliases", "pack").Exec() }) }) })