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

Commit

Permalink
Merge pull request #397 from docker/fix-logout
Browse files Browse the repository at this point in the history
Fix logout
  • Loading branch information
chris-crone authored Jul 17, 2020
2 parents 0bf09d3 + d1a929e commit 45604a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion cli/cmd/logout/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func Command() *cobra.Command {
Use: "logout [SERVER]",
Short: "Log out from a Docker registry or cloud backend",
Long: "Log out from a Docker registry or cloud backend.\nIf no server is specified, the default is defined by the daemon.",
Args: cobra.MaximumNArgs(0),
Args: cobra.MaximumNArgs(1),
RunE: runLogout,
}

Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ func (s *E2eSuite) TestClassicLogin() {
output, err := s.NewDockerCommand("login", "someregistry.docker.io").Exec()
Expect(output).To(ContainSubstring("Cannot perform an interactive login from a non TTY device"))
Expect(err).NotTo(BeNil())
output, err = s.NewDockerCommand("logout", "someregistry.docker.io").Exec()
Expect(output).To(ContainSubstring("Removing login credentials for someregistry.docker.io"))
Expect(err).To(BeNil())
}

func (s *E2eSuite) TestCloudLogin() {
Expand Down

0 comments on commit 45604a6

Please sign in to comment.