Skip to content

Commit d9a6ed9

Browse files
committed
incorporating @hbelmiro's review
Signed-off-by: Ricardo Zanini <[email protected]>
1 parent 1114573 commit d9a6ed9

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

client/runtime/src/test/java/io/quarkiverse/openapi/generator/providers/AbstractOpenApiSpecProviderTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ abstract class AbstractOpenApiSpecProviderTest<T extends AbstractAuthProvider> {
1616

1717
protected static final String OPEN_API_FILE_SPEC_ID = "open_api_file_spec_id_json";
1818
protected static final String AUTH_SCHEME_NAME = "auth_scheme_name";
19-
protected static final String QUARKUS_CONFIG_KEY = "quarkus.openapi-generator." + OPEN_API_FILE_SPEC_ID + ".auth."
20-
+ AUTH_SCHEME_NAME;
2119

2220
@Mock
2321
protected ClientRequestContext requestContext;

client/runtime/src/test/java/io/quarkiverse/openapi/generator/providers/BearerOpenApiSpecProviderTest.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ protected BearerAuthenticationProvider createProvider() {
2929

3030
@Test
3131
void filterNoSchemaCase() throws IOException {
32-
filter(null, INCOMING_TOKEN, INCOMING_TOKEN);
32+
filter(null, INCOMING_TOKEN);
3333
}
3434

3535
@Test
3636
void filterBearerSchemaCase() throws IOException {
37-
filter(BEARER_SCHEMA, INCOMING_TOKEN, "Bearer " + INCOMING_TOKEN);
37+
filter(BEARER_SCHEMA, "Bearer " + INCOMING_TOKEN);
3838
}
3939

4040
@Test
4141
void filterCustomSchemaCase() throws IOException {
42-
filter(CUSTOM_SCHEMA, INCOMING_TOKEN, CUSTOM_SCHEMA + " " + INCOMING_TOKEN);
42+
filter(CUSTOM_SCHEMA, CUSTOM_SCHEMA + " " + INCOMING_TOKEN);
4343
}
4444

45-
private void filter(String bearerScheme, String currentToken, String expectedAuthorizationHeader) throws IOException {
45+
private void filter(String bearerScheme, String expectedAuthorizationHeader) throws IOException {
4646
provider = new BearerAuthenticationProvider(OPEN_API_FILE_SPEC_ID, AUTH_SCHEME_NAME, bearerScheme,
4747
List.of());
4848
provider.filter(requestContext);
@@ -52,7 +52,6 @@ private void filter(String bearerScheme, String currentToken, String expectedAut
5252
@ParameterizedTest
5353
@MethodSource("filterWithPropagationTestValues")
5454
void filterWithPropagation(String headerName,
55-
String currentToken,
5655
String bearerScheme,
5756
String expectedAuthorizationHeader) throws IOException {
5857
String propagatedHeaderName;
@@ -64,14 +63,14 @@ void filterWithPropagation(String headerName,
6463
HEADER_NAME);
6564
}
6665
headers.putSingle(propagatedHeaderName, INCOMING_TOKEN);
67-
filter(bearerScheme, currentToken, expectedAuthorizationHeader);
66+
filter(bearerScheme, expectedAuthorizationHeader);
6867
}
6968

7069
static Stream<Arguments> filterWithPropagationTestValues() {
7170
return Stream.of(
72-
Arguments.of(null, INCOMING_TOKEN, "bearer", "Bearer " + INCOMING_TOKEN),
73-
Arguments.of(null, INCOMING_TOKEN, CUSTOM_SCHEMA, CUSTOM_SCHEMA + " " + INCOMING_TOKEN),
74-
Arguments.of(HEADER_NAME, INCOMING_TOKEN, "bearer", "Bearer " + INCOMING_TOKEN),
75-
Arguments.of(HEADER_NAME, INCOMING_TOKEN, CUSTOM_SCHEMA, CUSTOM_SCHEMA + " " + INCOMING_TOKEN));
71+
Arguments.of(null, "bearer", "Bearer " + INCOMING_TOKEN),
72+
Arguments.of(null, CUSTOM_SCHEMA, CUSTOM_SCHEMA + " " + INCOMING_TOKEN),
73+
Arguments.of(HEADER_NAME, "bearer", "Bearer " + INCOMING_TOKEN),
74+
Arguments.of(HEADER_NAME, CUSTOM_SCHEMA, CUSTOM_SCHEMA + " " + INCOMING_TOKEN));
7675
}
7776
}

0 commit comments

Comments
 (0)