Browse code

Planned 1.13 deprecation: email from login

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2016/09/24 03:52:57
Showing 4 changed files
... ...
@@ -35,14 +35,9 @@ func NewLoginCommand(dockerCli *command.DockerCli) *cobra.Command {
35 35
 	}
36 36
 
37 37
 	flags := cmd.Flags()
38
-
39 38
 	flags.StringVarP(&opts.user, "username", "u", "", "Username")
40 39
 	flags.StringVarP(&opts.password, "password", "p", "", "Password")
41 40
 
42
-	// Deprecated in 1.11: Should be removed in docker 1.14
43
-	flags.StringVarP(&opts.email, "email", "e", "", "Email")
44
-	flags.MarkDeprecated("email", "will be removed in 1.14.")
45
-
46 41
 	return cmd
47 42
 }
48 43
 
... ...
@@ -96,7 +96,7 @@ on all subcommands (due to it conflicting with, e.g. `-h` / `--hostname` on
96 96
 ### `-e` and `--email` flags on `docker login`
97 97
 **Deprecated In Release: [v1.11.0](https://github.com/docker/docker/releases/tag/v1.11.0)**
98 98
 
99
-**Target For Removal In Release: v1.14**
99
+**Removed In Release: [v1.14.0](https://github.com/docker/docker/releases/)**
100 100
 
101 101
 The docker login command is removing the ability to automatically register for an account with the target registry if the given username doesn't exist. Due to this change, the email flag is no longer required, and will be deprecated.
102 102
 
... ...
@@ -28,17 +28,3 @@ func (s *DockerRegistryAuthHtpasswdSuite) TestLoginToPrivateRegistry(c *check.C)
28 28
 	// now it's fine
29 29
 	dockerCmd(c, "login", "-u", s.reg.username, "-p", s.reg.password, privateRegistryURL)
30 30
 }
31
-
32
-func (s *DockerRegistryAuthHtpasswdSuite) TestLoginToPrivateRegistryDeprecatedEmailFlag(c *check.C) {
33
-	// Test to make sure login still works with the deprecated -e and --email flags
34
-	// wrong credentials
35
-	out, _, err := dockerCmdWithError("login", "-u", s.reg.username, "-p", "WRONGPASSWORD", "-e", s.reg.email, privateRegistryURL)
36
-	c.Assert(err, checker.NotNil, check.Commentf(out))
37
-	c.Assert(out, checker.Contains, "401 Unauthorized")
38
-
39
-	// now it's fine
40
-	// -e flag
41
-	dockerCmd(c, "login", "-u", s.reg.username, "-p", s.reg.password, "-e", s.reg.email, privateRegistryURL)
42
-	// --email flag
43
-	dockerCmd(c, "login", "-u", s.reg.username, "-p", s.reg.password, "--email", s.reg.email, privateRegistryURL)
44
-}
... ...
@@ -103,7 +103,7 @@ func (s *DockerRegistrySuite) TestUserAgentPassThrough(c *check.C) {
103 103
 	s.d.Cmd("build", "--file", dockerfileName, ".")
104 104
 	regexpCheckUA(c, buildUA)
105 105
 
106
-	s.d.Cmd("login", "-u", "richard", "-p", "testtest", "-e", "testuser@testdomain.com", loginReg.hostport)
106
+	s.d.Cmd("login", "-u", "richard", "-p", "testtest", loginReg.hostport)
107 107
 	regexpCheckUA(c, loginUA)
108 108
 
109 109
 	s.d.Cmd("pull", pullRepoName)