Skip to content

Commit

Permalink
fix: bump gateway-api version
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumelamirand committed Jul 6, 2023
1 parent 37c993c commit 1afc199
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>
<gravitee-bom.version>5.0.0</gravitee-bom.version>
<gravitee-gateway-api.version>3.0.0-alpha.7</gravitee-gateway-api.version>
<gravitee-gateway-api.version>3.0.0-alpha.9</gravitee-gateway-api.version>
<gravitee-policy-api.version>1.11.0</gravitee-policy-api.version>
<gravitee-node.version>3.1.0-alpha.10</gravitee-node.version>
<gravitee-common.version>2.1.1</gravitee-common.version>
Expand Down
14 changes: 13 additions & 1 deletion src/test/java/io/gravitee/policy/keyless/KeylessPolicyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,19 @@ void shouldReturnNoneTypedSecurityTokenWhenNoneTypedSecurityTokenInInternalAttri
@EnumSource(value = SecurityToken.TokenType.class, names = { "CLIENT_ID", "API_KEY" })
@DisplayName("Should return an empty Maybe if there was a SecurityToken extracted by the previous plan")
void shouldReturnAnEmptyWhenExtractingSecurityToken(SecurityToken.TokenType type) {
when(ctx.getInternalAttribute(ATTR_INTERNAL_SECURITY_TOKEN)).thenReturn(new SecurityToken(type, "tokenValue"));
when(ctx.getInternalAttribute(ATTR_INTERNAL_SECURITY_TOKEN))
.thenReturn(SecurityToken.builder().tokenType(type.name()).tokenValue("tokenValue").build());
final TestObserver<SecurityToken> obs = cut.extractSecurityToken(ctx).test();

obs.assertNoValues();
}

@ParameterizedTest
@EnumSource(value = SecurityToken.TokenType.class, names = { "CLIENT_ID", "API_KEY" })
@DisplayName("Should return an empty Maybe if there was an invalid SecurityToken extracted by the previous plan")
void shouldReturnAnEmptyWhenExtractingInvalidSecurityToken(SecurityToken.TokenType type) {
when(ctx.getInternalAttribute(ATTR_INTERNAL_SECURITY_TOKEN))
.thenReturn(SecurityToken.builder().tokenType(type.name()).invalid(true).build());
final TestObserver<SecurityToken> obs = cut.extractSecurityToken(ctx).test();

obs.assertNoValues();
Expand Down

0 comments on commit 1afc199

Please sign in to comment.