refactor(cli): remove old cli commands (#1756)

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
LaurentiuNiculae
2023-09-08 15:12:47 +03:00
committed by GitHub
parent 18e591f52a
commit 7b1e24c99e
31 changed files with 1455 additions and 4118 deletions
+5 -5
View File
@@ -90,7 +90,7 @@ func TestTLSWithAuth(t *testing.T) {
defer os.RemoveAll(destCertsDir)
args := []string{"imagetest", "--name", "dummyImageName", "--url", HOST1}
args := []string{"name", "dummyImageName", "--url", HOST1}
imageCmd := NewImageCommand(new(searchService))
imageBuff := bytes.NewBufferString("")
imageCmd.SetOut(imageBuff)
@@ -100,7 +100,7 @@ func TestTLSWithAuth(t *testing.T) {
So(err, ShouldNotBeNil)
So(imageBuff.String(), ShouldContainSubstring, "invalid URL format")
args = []string{"imagetest"}
args = []string{"list", "--config", "imagetest"}
configPath = makeConfigFile(
fmt.Sprintf(`{"configs":[{"_name":"imagetest","url":"%s%s%s","showspinner":false}]}`,
BaseSecureURL1, constants.RoutePrefix, constants.ExtCatalogPrefix))
@@ -115,7 +115,7 @@ func TestTLSWithAuth(t *testing.T) {
So(imageBuff.String(), ShouldContainSubstring, "check credentials")
user := fmt.Sprintf("%s:%s", username, passphrase)
args = []string{"imagetest", "-u", user}
args = []string{"-u", user, "--config", "imagetest"}
configPath = makeConfigFile(
fmt.Sprintf(`{"configs":[{"_name":"imagetest","url":"%s%s%s","showspinner":false}]}`,
BaseSecureURL1, constants.RoutePrefix, constants.ExtCatalogPrefix))
@@ -170,7 +170,7 @@ func TestTLSWithoutAuth(t *testing.T) {
test.CopyTestFiles(sourceCertsDir, destCertsDir)
defer os.RemoveAll(destCertsDir)
args := []string{"imagetest"}
args := []string{"list", "--config", "imagetest"}
imageCmd := NewImageCommand(new(searchService))
imageBuff := bytes.NewBufferString("")
imageCmd.SetOut(imageBuff)
@@ -211,7 +211,7 @@ func TestTLSBadCerts(t *testing.T) {
BaseSecureURL3, constants.RoutePrefix, constants.ExtCatalogPrefix))
defer os.Remove(configPath)
args := []string{"imagetest"}
args := []string{"list", "--config", "imagetest"}
imageCmd := NewImageCommand(new(searchService))
imageBuff := bytes.NewBufferString("")
imageCmd.SetOut(imageBuff)