Skip to content

make public API tests not use @testable again #216

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 1 commit into from
May 19, 2020

Conversation

weissi
Copy link
Contributor

@weissi weissi commented May 19, 2020

Motivation:

AHC's tests were split in HTTPClientTests (which only use the public
API) and HTTPClientInternalTests (which can use internal API by using
@testable). At some point, the public API tests had @testable added
to the AHC import which breaks this idea.

Modification:

Restore the intent by removing @testable and moving the 2 tests that
needed it over.

Result:

Cleaner test suite.

Motivation:

AHC's tests were split in HTTPClientTests (which only use the public
API) and HTTPClientInternalTests (which can use `internal` API by using
`@testable`). At some point, the public API tests had `@testable` added
to the AHC import which breaks this idea.

Modification:

Restore the intent by removing `@testable` and moving the 2 tests that
needed it over.

Result:

Cleaner test suite.
@weissi weissi requested a review from artemredkin May 19, 2020 15:52
Copy link
Collaborator

@artemredkin artemredkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

@testable import AsyncHTTPClient
/* NOT @testable */ import AsyncHTTPClient // Tests that need @testable go into HTTPClientInternalTests.swift
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice strategy to only have a specific file for those, +1

@weissi weissi merged commit b1bb7ae into swift-server:master May 19, 2020
@weissi weissi deleted the jw-internal-tests branch May 19, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants