Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 45604a6

Browse files
authoredJul 17, 2020
Merge pull request #397 from docker/fix-logout
Fix logout
2 parents 0bf09d3 + d1a929e commit 45604a6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed
 
File renamed without changes.

‎cli/cmd/logout/logout.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func Command() *cobra.Command {
1212
Use: "logout [SERVER]",
1313
Short: "Log out from a Docker registry or cloud backend",
1414
Long: "Log out from a Docker registry or cloud backend.\nIf no server is specified, the default is defined by the daemon.",
15-
Args: cobra.MaximumNArgs(0),
15+
Args: cobra.MaximumNArgs(1),
1616
RunE: runLogout,
1717
}
1818

‎tests/e2e/e2e_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ func (s *E2eSuite) TestClassicLogin() {
133133
output, err := s.NewDockerCommand("login", "someregistry.docker.io").Exec()
134134
Expect(output).To(ContainSubstring("Cannot perform an interactive login from a non TTY device"))
135135
Expect(err).NotTo(BeNil())
136+
output, err = s.NewDockerCommand("logout", "someregistry.docker.io").Exec()
137+
Expect(output).To(ContainSubstring("Removing login credentials for someregistry.docker.io"))
138+
Expect(err).To(BeNil())
136139
}
137140

138141
func (s *E2eSuite) TestCloudLogin() {

0 commit comments

Comments
 (0)
This repository has been archived.