Skip to content

Commit

Permalink
Fix LbAuthorizer test
Browse files Browse the repository at this point in the history
  • Loading branch information
mosabua committed Oct 20, 2023
1 parent 434eec9 commit 03601a2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package io.trino.gateway.ha.security;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import io.trino.gateway.ha.config.AuthorizationConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.BeforeAll;
Expand All @@ -8,9 +11,6 @@
import java.util.Optional;
import java.util.regex.PatternSyntaxException;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

@Slf4j
public class TestLbAuthorizer {
private static final String USER = "username";
Expand Down Expand Up @@ -46,11 +46,11 @@ static void configureRole(String regex, String role) {
}

static void assertMatch(String role) {
assertTrue(authorizer.authorize(principal, role));
assertTrue(authorizer.authorize(principal, role, null));
}

static void assertNotMatch(String role) {
assertFalse(authorizer.authorize(principal, role));
assertFalse(authorizer.authorize(principal, role, null));
}

static void assertBadPattern(String role) {
Expand Down

0 comments on commit 03601a2

Please sign in to comment.