Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions command/v7/login_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,27 @@ var _ = Describe("login Command", func() {
})
})

When("targeting the API fails due to an invalid certificate", func() {
BeforeEach(func() {
cmd.APIEndpoint = "api.example.com"
fakeActor.SetTargetReturns(nil, ccerror.UnverifiedServerError{URL: "https://api.example.com"})
When("certificate is invalid", func() {
When("targeting the API without setting --skip-ssl-validation flag", func() {
BeforeEach(func() {
cmd.APIEndpoint = "api.example.com"
fakeActor.SetTargetReturns(nil, ccerror.UnverifiedServerError{URL: "https://api.example.com"})
})

It("returns an error mentioning the login command", func() {
Expect(executeErr).To(MatchError(
translatableerror.InvalidSSLCertError{URL: "https://api.example.com", SuggestedCommand: "login"}))
})
})

It("returns an error mentioning the login command", func() {
Expect(executeErr).To(MatchError(
translatableerror.InvalidSSLCertError{URL: "https://api.example.com", SuggestedCommand: "login"}))
When("targeting the API with --skip-ssl-validation flag", func() {
BeforeEach(func() {
cmd.APIEndpoint = "api.example.com"
})

It("login succeeds", func() {
Expect(executeErr).NotTo(HaveOccurred())
})
})
})
})
Expand Down
239 changes: 0 additions & 239 deletions integration/shared/isolated/logs_command_test.go

This file was deleted.

Loading
Loading