Skip to content

Change how we test DnsOverHttps#9549

Open
swankjesse wants to merge 2 commits into
masterfrom
jwilson.0715.dns_server_
Open

Change how we test DnsOverHttps#9549
swankjesse wants to merge 2 commits into
masterfrom
jwilson.0715.dns_server_

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

Rather than returning opaque hard-coded response bodies, use our new message encoder so we can test with real value objects.

Rather than returning opaque hard-coded response bodies, use our
new message encoder so we can test with real value objects.
@@ -79,75 +85,68 @@ class DnsOverHttpsTest {

@Test
fun getOne() {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The previous opaque hex values made it difficult to tell that the query was for google.com and the result was for star.c10r.facebook.com.

In a forthcoming PR I’ll replace both with lysine.dev

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

(It was a bug that the query and result domain names didn’t match)

@RequiresOptIn(level = ERROR, message = "Internal APIs for OkHttp's own modules")
@Retention(BINARY)
@Target(CLASS, FUNCTION, PROPERTY)
annotation class OkHttpInternalApi

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Keen to hear feedback on this thing I’m sneaking in

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.

1 participant