From c0e4d23031132bc6af10aee498d117f7a2f93bd4 Mon Sep 17 00:00:00 2001 From: Thorsten de Buhr Date: Wed, 6 Sep 2023 10:28:29 +0200 Subject: [PATCH] removed deprecated commands --- cmd/commands/add_test.go | 7 ++ cmd/commands/index.go | 41 -------- cmd/commands/index_test.go | 160 ---------------------------- cmd/commands/index_windows_test.go | 13 --- cmd/commands/pack.go | 162 ----------------------------- cmd/commands/pack_test.go | 149 -------------------------- cmd/commands/pdsc.go | 76 -------------- cmd/commands/pdsc_test.go | 101 ------------------ cmd/commands/root.go | 3 - 9 files changed, 7 insertions(+), 705 deletions(-) delete mode 100644 cmd/commands/index.go delete mode 100644 cmd/commands/index_test.go delete mode 100644 cmd/commands/index_windows_test.go delete mode 100644 cmd/commands/pack.go delete mode 100644 cmd/commands/pack_test.go delete mode 100644 cmd/commands/pdsc.go delete mode 100644 cmd/commands/pdsc_test.go diff --git a/cmd/commands/add_test.go b/cmd/commands/add_test.go index 62206c4..648d8ee 100644 --- a/cmd/commands/add_test.go +++ b/cmd/commands/add_test.go @@ -11,6 +11,13 @@ import ( errs "github.com/open-cmsis-pack/cpackget/cmd/errors" ) +var ( + packFilePath = filepath.Join(testingDir, "1.2.3", "TheVendor.PublicLocalPack.1.2.3.pack") + fileWithPacksListed = "file_with_listed_packs.txt" + fileWithNoPacksListed = "file_with_no_listed_packs.txt" + pdscFilePath = filepath.Join(testingDir, "1.2.3", "TheVendor.PackName.pdsc") +) + var addCmdTests = []TestCase{ { name: "test help command", diff --git a/cmd/commands/index.go b/cmd/commands/index.go deleted file mode 100644 index 8018ee9..0000000 --- a/cmd/commands/index.go +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands - -import ( - "os" - - "github.com/open-cmsis-pack/cpackget/cmd/installer" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" -) - -// overwrite is a flag that tells whether or not to overwrite current CMSIS_PACK_ROOT/.Web/index.pidx -var overwrite bool - -var IndexCmd = &cobra.Command{ - Deprecated: "Consider running `cpackget update-index` instead", - Use: "index ", - Short: "Updates public index", - Long: getLongIndexDescription(), - PersistentPreRunE: configureInstaller, - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - log.Infof("Updating index %v", args) - indexPath := args[0] - installer.UnlockPackRoot() - err := installer.UpdatePublicIndex(indexPath, overwrite, true, false, false, viper.GetInt("concurrent-downloads"), viper.GetInt("timeout")) - installer.LockPackRoot() - return err - }, -} - -func getLongIndexDescription() string { - return `Updates the public index in ` + os.Getenv("CMSIS_PACK_ROOT") + `/.Web/index.pidx using the file specified by the given url. -If there's already an index file, cpackget won't overwrite it. Use "-f" to do so.` -} - -func init() { - IndexCmd.Flags().BoolVarP(&overwrite, "force", "f", false, "forces cpackget to overwrite an existing public index file") -} diff --git a/cmd/commands/index_test.go b/cmd/commands/index_test.go deleted file mode 100644 index 62c00fa..0000000 --- a/cmd/commands/index_test.go +++ /dev/null @@ -1,160 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands_test - -import ( - "errors" - "os" - "path/filepath" - "testing" - - errs "github.com/open-cmsis-pack/cpackget/cmd/errors" -) - -var indexCmdTests = []TestCase{ - { - name: "test no parameter given", - args: []string{"index"}, - expectedErr: errors.New("accepts 1 arg(s), received 0"), - }, - { - name: "test help command", - args: []string{"help", "index"}, - expectedErr: nil, - }, - { - name: "test cannot overwrite current index", - args: []string{"index", "index.pidx"}, - createPackRoot: true, - expectedErr: errs.ErrCannotOverwritePublicIndex, - }, - { - name: "test updating index default mode", - args: []string{"index", "--force"}, - defaultMode: true, - createPackRoot: true, - expectedStdout: []string{"Updating index"}, - setUpFunc: func(t *TestCase) { - server := NewServer() - t.args = append(t.args, server.URL()+"index.pidx") - server.AddRoute("index.pidx", []byte(` - -TheVendor -http://the.vendor/ -2021-10-17T12:21:59.1747971+00:00 - - - -`)) - }, - }, - { - name: "test updating index default mode no preexisting index", - args: []string{"index", "--force"}, - defaultMode: true, - createPackRoot: false, - expectedStdout: []string{"Updating index"}, - setUpFunc: func(t *TestCase) { - server := NewServer() - t.args = append(t.args, server.URL()+"index.pidx") - server.AddRoute("index.pidx", []byte(` - -TheVendor -http://the.vendor/ -2021-10-17T12:21:59.1747971+00:00 - - - -`)) - }, - }, - { - name: "test updating index", - args: []string{"index", "--force"}, - createPackRoot: true, - expectedStdout: []string{"Updating index"}, - setUpFunc: func(t *TestCase) { - server := NewServer() - t.args = append(t.args, server.URL()+"index.pidx") - server.AddRoute("index.pidx", []byte(` - -TheVendor -http://the.vendor/ -2021-10-17T12:21:59.1747971+00:00 - - - -`)) - }, - }, -} - -func TestIndexCmd(t *testing.T) { - runTests(t, indexCmdTests) -} - -// Tests for init command are placed here because there was something wrong -// while putting them into a file init_test.go - -var ( - pidxFilePath = filepath.Join(testingDir, "SamplePublicIndex.pidx") - notFoundPidxFilePath = filepath.Join("path", "to", "index.pidx") -) - -var initCmdTests = []TestCase{ - { - name: "test no parameter given", - args: []string{"init"}, - expectedErr: errors.New("accepts 1 arg(s), received 0"), - }, - { - name: "test help command", - args: []string{"help", "init"}, - expectedErr: nil, - }, - { - name: "test create using an index.pidx", - args: []string{"init"}, - setUpFunc: func(t *TestCase) { - server := NewServer() - t.args = append(t.args, server.URL()+"index.pidx") - server.AddRoute("index.pidx", []byte(` - -TheVendor -http://the.vendor/ -2021-10-17T12:21:59.1747971+00:00 - - - -`)) - }, - }, - { - name: "test create using local index.pidx", - args: []string{"init", pidxFilePath}, - createPackRoot: true, - }, - { - name: "test create using local index.pidx that do not exist", - args: []string{"init", notFoundPidxFilePath}, - createPackRoot: true, - expectedErr: errs.ErrFileNotFound, - }, - { - name: "test create using directory as path", - args: []string{"init", "foo/"}, - createPackRoot: true, - expectedErr: errs.ErrInvalidPublicIndexReference, - setUpFunc: func(t *TestCase) { - t.assert.Nil(os.Mkdir("foo/", 0777)) - }, - tearDownFunc: func() { - os.Remove("foo/") - }, - }, -} - -func TestInitCmd(t *testing.T) { - runTests(t, initCmdTests) -} diff --git a/cmd/commands/index_windows_test.go b/cmd/commands/index_windows_test.go deleted file mode 100644 index 0793d7e..0000000 --- a/cmd/commands/index_windows_test.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build windows -// +build windows - -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands_test - -import ( - "syscall" -) - -var expectedFileNotFoundError = syscall.ERROR_PATH_NOT_FOUND diff --git a/cmd/commands/pack.go b/cmd/commands/pack.go deleted file mode 100644 index a0176ac..0000000 --- a/cmd/commands/pack.go +++ /dev/null @@ -1,162 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands - -import ( - "bufio" - "os" - - errs "github.com/open-cmsis-pack/cpackget/cmd/errors" - "github.com/open-cmsis-pack/cpackget/cmd/installer" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" -) - -var PackCmd = &cobra.Command{ - Deprecated: "Consider running `cpackget add|rm|list` instead", - Use: "pack", - Short: "Adds/Removes Open-CMSIS-Pack packages", - Long: "Adds/Removes Open-CMSIS-Pack packages from a local file or a file hosted somewhere else on the Internet.", - PersistentPreRunE: configureInstaller, -} - -// skipEula tells whether pack's license should be presented to the user or not for a yay-or-nay acceptance -var skipEula bool - -// extractEula forces extraction of the embedded license only, not installing the pack -var extractEula bool - -// forceReinstall forces installation of an already installed pack -var forceReinstall bool - -// noRequirements skips installing package requirements -var noRequirements bool - -// packsListFileName is the file name where a list of pack urls is present -var packsListFileName string - -// listPublic tells whether listing all packs in the public index -var listPublic bool - -// listCached tells whether listing all cached packs -var listCached bool - -// listFilter is a set of words by which to filter listed packs -var listFilter string - -var packAddCmd = &cobra.Command{ - Use: "add [ | -f ]", - Short: "Adds Open-CMSIS-Pack packages", - Long: `Adds a pack using the file specified in "" or using packs URLs provided by "-f ". -The file can be a local file or a file hosted somewhere else on the Internet. -If it's hosted somewhere, cpackget will first download it then extract all pack files into "CMSIS_PACK_ROOT////" -If "-f" is used, cpackget will call "cpackget pack add" on each URL specified in the file.`, - Args: cobra.MinimumNArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - - if packsListFileName != "" { - log.Infof("Parsing packs urls via file %v", packsListFileName) - - file, err := os.Open(packsListFileName) - if err != nil { - return err - } - defer file.Close() - - scanner := bufio.NewScanner(file) - for scanner.Scan() { - args = append(args, scanner.Text()) - } - - if err := scanner.Err(); err != nil { - return err - } - } - - if len(args) == 0 { - log.Error("Missing a pack-path or list with pack urls specified via -f/--packs-list-filename") - return errs.ErrIncorrectCmdArgs - } - - log.Debugf("Specified packs %v", args) - var firstError error - installer.UnlockPackRoot() - for _, packPath := range args { - if err := installer.AddPack(packPath, !skipEula, extractEula, forceReinstall, noRequirements, viper.GetInt("timeout")); err != nil { - if firstError == nil { - firstError = err - } - - if !errs.AlreadyLogged(err) { - log.Error(err) - } - } - } - installer.LockPackRoot() - - if firstError == nil { - return nil - } - return errs.ErrAlreadyLogged - }, -} - -// purge stores the value of "--purge" flag for the "pack rm" command -var purge bool - -var packRmCmd = &cobra.Command{ - Use: "rm ", - Short: "Removes Open-CMSIS-Pack packages", - Long: `Removes a pack using the reference "PackVendor.PackName[.x.y.z]". -The version "x.y.z" is optional. This will remove the pack from the reference index files. -Cache files (i.e. under CMSIS_PACK_ROOT/.Download/) are *NOT* removed. If cache files need to be actually removed, please use "--purge".`, - Args: cobra.MinimumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - log.Infof("Removing %v", args) - installer.UnlockPackRoot() - defer installer.LockPackRoot() - for _, packPath := range args { - if err := installer.RemovePack(packPath, purge, viper.GetInt("timeout")); err != nil { - return err - } - } - - return nil - }, -} - -var packListCmd = &cobra.Command{ - Use: "list [--cached|--public]", - Short: "Lists installed packs", - Long: `Lists all installed packs and optionally cached pack files`, - Args: cobra.MaximumNArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - return installer.ListInstalledPacks(listCached, listPublic, false, listFilter) - }, -} - -func init() { - packRmCmd.Flags().BoolVarP(&purge, "purge", "p", false, "forces deletion of cached pack files") - packAddCmd.Flags().BoolVarP(&skipEula, "agree-embedded-license", "a", false, "agrees with the embedded license of the pack") - packAddCmd.Flags().BoolVarP(&extractEula, "extract-embedded-license", "x", false, "extracts the embedded license of the pack and aborts the installation") - packAddCmd.Flags().BoolVarP(&forceReinstall, "force-reinstall", "F", false, "forces installation of an already installed pack") - packAddCmd.Flags().StringVarP(&packsListFileName, "packs-list-filename", "f", "", "specifies a file listing packs urls, one per line") - packAddCmd.Flags().BoolVarP(&noRequirements, "no-dependencies", "n", false, "do not install package dependencies") - packListCmd.Flags().BoolVarP(&listCached, "cached", "c", false, "lists only cached packs") - packListCmd.Flags().BoolVarP(&listPublic, "public", "p", false, "lists packs in the public index") - PackCmd.AddCommand(packAddCmd, packRmCmd, packListCmd) - - packAddCmd.SetHelpFunc(func(command *cobra.Command, strings []string) { - err := command.Flags().MarkHidden("concurrent-downloads") - log.Debug(err) - command.Parent().HelpFunc()(command, strings) - }) - packRmCmd.SetHelpFunc(func(command *cobra.Command, strings []string) { - err := command.Flags().MarkHidden("concurrent-downloads") - _ = command.Flags().MarkHidden("timeout") - log.Debug(err) - command.Parent().HelpFunc()(command, strings) - }) - packListCmd.SetHelpFunc(packRmCmd.HelpFunc()) -} diff --git a/cmd/commands/pack_test.go b/cmd/commands/pack_test.go deleted file mode 100644 index 642ffd1..0000000 --- a/cmd/commands/pack_test.go +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands_test - -import ( - "errors" - "os" - "path/filepath" - "testing" - - errs "github.com/open-cmsis-pack/cpackget/cmd/errors" -) - -var ( - packFilePath = filepath.Join(testingDir, "1.2.3", "TheVendor.PublicLocalPack.1.2.3.pack") - fileWithPacksListed = "file_with_listed_packs.txt" - fileWithNoPacksListed = "file_with_no_listed_packs.txt" -) - -var packCmdTests = []TestCase{ - { - name: "test no parameter given", - args: []string{"pack"}, - expectedStdout: []string{"Adds/Removes Open-CMSIS-Pack packages from a local file or a file hosted somewhere else on the Internet"}, - }, - - // Add - { - name: "test help command", - args: []string{"help", "pack", "add"}, - expectedErr: nil, - }, - { - name: "test adding pack file no args", - args: []string{"pack", "add"}, - createPackRoot: true, - expectedStdout: []string{"Missing a pack-path or list with pack urls specified via -f/--packs-list-filename"}, - expectedErr: errs.ErrIncorrectCmdArgs, - }, - { - name: "test adding pack missing file", - args: []string{"pack", "add", "DoesNotExist.Pack.1.2.3.pack"}, - createPackRoot: true, - expectedStdout: []string{"File", "DoesNotExist.Pack.1.2.3.pack", "doesn't exist"}, - expectedErr: errs.ErrAlreadyLogged, - }, - { - name: "test adding pack file default mode", - args: []string{"pack", "add", packFilePath}, - createPackRoot: true, - defaultMode: true, - expectedStdout: []string{"Adding pack", filepath.Base(packFilePath)}, - }, - { - name: "test adding pack file default mode no preexisting index", - args: []string{"pack", "add", packFilePath}, - createPackRoot: false, - defaultMode: true, - expectedStdout: []string{"Adding pack", filepath.Base(packFilePath)}, - }, - { - name: "test adding pack file", - args: []string{"pack", "add", packFilePath}, - createPackRoot: true, - expectedStdout: []string{"Adding pack", filepath.Base(packFilePath)}, - }, - { - name: "test adding packs listed in file", - args: []string{"pack", "add", "-f", fileWithPacksListed}, - createPackRoot: true, - expectedStdout: []string{"Parsing packs urls via file " + fileWithPacksListed, - "Adding pack", filepath.Base(packFilePath)}, - setUpFunc: func(t *TestCase) { - f, _ := os.Create(fileWithPacksListed) - _, _ = f.WriteString(packFilePath) - f.Close() - }, - tearDownFunc: func() { - os.Remove(fileWithPacksListed) - }, - }, - - // Rm - { - name: "test removing pack file no args", - args: []string{"pack", "rm"}, - expectedErr: errors.New("requires at least 1 arg(s), only received 0"), - }, - { - name: "test help command", - args: []string{"help", "pack", "rm"}, - expectedErr: nil, - }, - { - name: "test removing pack default mode", - args: []string{"pack", "rm", "TheVendor.PublicLocalPack.1.2.3"}, - createPackRoot: true, - defaultMode: true, - expectedStdout: []string{"Removing [TheVendor.PublicLocalPack.1.2.3]"}, - expectedErr: errs.ErrPackNotInstalled, - }, - { - name: "test removing pack default mode no preexisting index", - args: []string{"pack", "rm", "TheVendor.PublicLocalPack.1.2.3"}, - createPackRoot: false, - defaultMode: true, - expectedStdout: []string{"Removing [TheVendor.PublicLocalPack.1.2.3]"}, - expectedErr: errs.ErrPackNotInstalled, - }, - { - name: "test removing pack", - args: []string{"pack", "rm", "TheVendor.PublicLocalPack.1.2.3"}, - createPackRoot: true, - expectedStdout: []string{"Removing [TheVendor.PublicLocalPack.1.2.3]"}, - expectedErr: errs.ErrPackNotInstalled, - }, - - // List - { - name: "test help command", - args: []string{"help", "pack", "list"}, - expectedErr: nil, - }, - { - name: "test listing installed packs default mode", - args: []string{"pack", "list"}, - createPackRoot: true, - defaultMode: true, - expectedStdout: []string{"Listing installed packs"}, - }, - { - name: "test listing installed packs default mode no preexisting index", - args: []string{"pack", "list"}, - createPackRoot: false, - defaultMode: true, - expectedStdout: []string{"Listing installed packs"}, - }, - { - name: "test listing installed packs", - args: []string{"pack", "list"}, - createPackRoot: true, - expectedStdout: []string{"Listing installed packs"}, - }, -} - -func TestPackCmd(t *testing.T) { - runTests(t, packCmdTests) -} diff --git a/cmd/commands/pdsc.go b/cmd/commands/pdsc.go deleted file mode 100644 index c65d7e5..0000000 --- a/cmd/commands/pdsc.go +++ /dev/null @@ -1,76 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands - -import ( - "github.com/open-cmsis-pack/cpackget/cmd/installer" - log "github.com/sirupsen/logrus" - "github.com/spf13/cobra" -) - -var PdscCmd = &cobra.Command{ - Deprecated: "Consider running `cpackget add|rm|list` instead", - Use: "pdsc", - Short: "Adds or removes Open-CMSIS-Pack packages in the local file system via PDSC files.", - PersistentPreRunE: configureInstaller, -} - -var pdscAddCmd = &cobra.Command{ - Use: "add ", - Short: "Adds a pack via pdsc file to the local repository index", - Long: `Adds a pack via pdsc file specified in . -cpackget will add the pdsc entry to CMSIS_PACK_ROOT/.Local/local_repository.pidx.`, - Args: cobra.MinimumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - log.Info("Adding pdsc") - installer.UnlockPackRoot() - defer installer.LockPackRoot() - for _, pdscPath := range args { - if err := installer.AddPdsc(pdscPath); err != nil { - return err - } - } - - return nil - }, -} - -var pdscRmCmd = &cobra.Command{ - Use: "rm ", - Short: "Removes a pack installed via pdsc file from the local repository index", - Long: `Removes the pack referenced by the pdsc file specified in , e.g. "PackVendor.PackName.x.y.z". -cpackget will remove the pdsc entry from CMSIS_PACK_ROOT/.Local/local_repository.pidx."`, - Args: cobra.MinimumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - log.Info("Removing pdsc") - installer.UnlockPackRoot() - defer installer.LockPackRoot() - for _, pdscPath := range args { - if err := installer.RemovePdsc(pdscPath); err != nil { - return err - } - } - - return nil - }, -} - -func init() { - PdscCmd.AddCommand(pdscAddCmd, pdscRmCmd) - PdscCmd.SetHelpFunc(func(command *cobra.Command, strings []string) { - err := command.Flags().MarkHidden("concurrent-downloads") - _ = command.Flags().MarkHidden("timeout") - log.Debug(err) - command.Parent().HelpFunc()(command, strings) - }) - // Since it's two subcommands, they can't just inherit - // the parent's help function - pdscAddCmd.SetHelpFunc(func(command *cobra.Command, strings []string) { - err := command.Flags().MarkHidden("concurrent-downloads") - _ = command.Flags().MarkHidden("timeout") - log.Debug(err) - PdscCmd.Parent().HelpFunc()(command, strings) - }) - pdscRmCmd.SetHelpFunc(pdscAddCmd.HelpFunc()) -} diff --git a/cmd/commands/pdsc_test.go b/cmd/commands/pdsc_test.go deleted file mode 100644 index d62558c..0000000 --- a/cmd/commands/pdsc_test.go +++ /dev/null @@ -1,101 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the cpackget project. */ - -package commands_test - -import ( - "errors" - "path/filepath" - "testing" - - errs "github.com/open-cmsis-pack/cpackget/cmd/errors" -) - -var ( - pdscFilePath = filepath.Join(testingDir, "1.2.3", "TheVendor.PackName.pdsc") -) - -var pdscCmdTests = []TestCase{ - { - name: "test help command", - args: []string{"help", "pdsc"}, - expectedErr: nil, - }, - { - name: "test no parameter given", - args: []string{"pdsc"}, - expectedStdout: []string{"Adds or removes Open-CMSIS-Pack packages in the local file system via PDSC files"}, - }, - - // Add - { - name: "test adding pdsc file no args", - args: []string{"pdsc", "add"}, - createPackRoot: true, - expectedErr: errors.New("requires at least 1 arg(s), only received 0"), - }, - { - name: "test help command", - args: []string{"help", "pdsc", "add"}, - expectedErr: nil, - }, - { - name: "test adding pdsc file default mode", - args: []string{"pdsc", "add", pdscFilePath}, - createPackRoot: true, - defaultMode: true, - expectedStdout: []string{"Adding pdsc"}, - }, - { - name: "test adding pdsc file default mode no preexisting index", - args: []string{"pdsc", "add", pdscFilePath}, - createPackRoot: false, - defaultMode: true, - expectedStdout: []string{"Adding pdsc"}, - }, - { - name: "test adding pdsc file", - args: []string{"pdsc", "add", pdscFilePath}, - createPackRoot: true, - expectedStdout: []string{"Adding pdsc"}, - }, - - // Rm - { - name: "test removing pdsc file no args", - args: []string{"pdsc", "rm"}, - expectedErr: errors.New("requires at least 1 arg(s), only received 0"), - }, - { - name: "test help command", - args: []string{"help", "pdsc", "rm"}, - expectedErr: nil, - }, - { - name: "test removing pdsc default mode", - args: []string{"pdsc", "rm", "TheVendor.PublicLocalPack.1.2.3"}, - createPackRoot: true, - defaultMode: true, - expectedStdout: []string{"Removing pdsc"}, - expectedErr: errs.ErrPdscEntryNotFound, - }, - { - name: "test removing pdsc default mode no preexisting index", - args: []string{"pdsc", "rm", "TheVendor.PublicLocalPack.1.2.3"}, - createPackRoot: false, - defaultMode: true, - expectedStdout: []string{"Removing pdsc"}, - expectedErr: errs.ErrPdscEntryNotFound, - }, - { - name: "test removing pdsc", - args: []string{"pdsc", "rm", "TheVendor.PublicLocalPack.1.2.3"}, - createPackRoot: true, - expectedStdout: []string{"Removing pdsc"}, - expectedErr: errs.ErrPdscEntryNotFound, - }, -} - -func TestPdscCmd(t *testing.T) { - runTests(t, pdscCmdTests) -} diff --git a/cmd/commands/root.go b/cmd/commands/root.go index 8c77f3b..c34279c 100644 --- a/cmd/commands/root.go +++ b/cmd/commands/root.go @@ -20,9 +20,6 @@ import ( // AllCommands contains all available commands for cpackget var AllCommands = []*cobra.Command{ - PackCmd, - PdscCmd, - IndexCmd, InitCmd, AddCmd, RmCmd,