Browse Source

Merge pull request #878 from gtardif/remove_obsolete_hidden_json_flag

Remove obsolete flag `docker context ls --json` (that was marked hidden)
Guillaume Tardif 5 years ago
parent
commit
2121cc5ca6
2 changed files with 0 additions and 5 deletions
  1. 0 2
      cli/cmd/context/ls.go
  2. 0 3
      tests/e2e/e2e_test.go

+ 0 - 2
cli/cmd/context/ls.go

@@ -57,9 +57,7 @@ func listCommand() *cobra.Command {
 		},
 	}
 	cmd.Flags().BoolVarP(&opts.quiet, "quiet", "q", false, "Only show context names")
-	cmd.Flags().BoolVar(&opts.json, "json", false, "Format output as JSON")
 	cmd.Flags().StringVar(&opts.format, "format", "", "Format the output. Values: [pretty | json]. (Default: pretty)")
-	_ = cmd.Flags().MarkHidden("json")
 
 	return cmd
 }

+ 0 - 3
tests/e2e/e2e_test.go

@@ -82,9 +82,6 @@ func TestContextDefault(t *testing.T) {
 		res = c.RunDockerCmd("context", "ls", "--format", "json")
 		golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json"))
 
-		res = c.RunDockerCmd("context", "ls", "--json")
-		golden.Assert(t, res.Stdout(), GoldenFile("ls-out-json"))
-
 		res = c.RunDockerCmd("context", "ls", "--format", "{{ json . }}")
 		golden.Assert(t, res.Stdout(), GoldenFile("ls-out-legacy-json"))
 	})