Skip to content

Commit

Permalink
Make TCK @BeforeClass method non-static (RestAssured setup process) (
Browse files Browse the repository at this point in the history
…#677)

Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar authored Jan 23, 2025
1 parent 06f3db7 commit 8e45b5a
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ public abstract class AppTestBase extends Arquillian {
private static final String DEFAULT_HOST = "localhost";
private static final int DEFAULT_PORT = 9080;

private static String serverUrl;
private static String username;
private static String password;

protected static final Filter YAML_FILTER = new YamlToJsonFilter();

@BeforeClass
public static void configureRestAssured() throws MalformedURLException {
public void configureRestAssured() throws MalformedURLException {
// set base URI and port number to use for all requests
serverUrl = System.getProperty("test.url");
String serverUrl = System.getProperty("test.url");
String protocol = DEFAULT_PROTOCOL;
String host = DEFAULT_HOST;
int port = DEFAULT_PORT;
Expand All @@ -65,8 +61,8 @@ public static void configureRestAssured() throws MalformedURLException {
RestAssured.baseURI = protocol + "://" + host;
RestAssured.port = port;

username = System.getProperty("test.user");
password = System.getProperty("test.pwd");
String username = System.getProperty("test.user");
String password = System.getProperty("test.pwd");

if (username != null && password != null) {
RestAssured.authentication = RestAssured.basic(username, password);
Expand Down

0 comments on commit 8e45b5a

Please sign in to comment.