Skip to content

Modify integration tests to not use fake server [v8] #3505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 21, 2025
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