Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TCK @BeforeClass method non-static (RestAssured setup process) #677

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading