Skip to content

Commit

Permalink
Merge pull request #3268 from aws/hdavidh/fix-integ-tests-user-agent-…
Browse files Browse the repository at this point in the history
…assertion

Update assertions for user agent in S3 integ tests
  • Loading branch information
davidh44 authored Sep 20, 2024
2 parents 6618fde + 40aadb2 commit 832c1b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ private static final class UserAgentVerifyingInterceptor implements ExecutionInt

@Override
public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) {
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io/sync");
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http/UrlConnection");
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io#sync");
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http#UrlConnection");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ public UserAgentVerifyingExecutionInterceptor(String clientName, ClientType clie

@Override
public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) {
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io/" + clientType.name());
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http/" + clientName);
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io#" + clientType.name());
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http#" + clientName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ public UserAgentVerifyingExecutionInterceptor(String clientName, ClientType clie

@Override
public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) {
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io/" + clientType.name());
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http/" + clientName);
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("io#" + clientType.name());
assertThat(context.httpRequest().firstMatchingHeader("User-Agent").get()).containsIgnoringCase("http#" + clientName);
}
}

Expand Down

0 comments on commit 832c1b9

Please sign in to comment.