Skip to content

Commit

Permalink
Adapt test cases to rest v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mekya committed May 27, 2021
1 parent 9b394e7 commit b4c7781
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,7 @@ public static Result callSetAppSettings(String appName, AppSettings appSettingsM


public static Result callSetServerSettings(ServerSettings serverSettings) throws Exception {
String url = ROOT_SERVICE_URL + "/admin/server-setting";
String url = ROOT_SERVICE_URL + "/admin/server-settings";
HttpClient client = HttpClients.custom().setRedirectStrategy(new LaxRedirectStrategy())
.setDefaultCookieStore(httpCookieStore).build();
Gson gson = new Gson();
Expand Down Expand Up @@ -2415,7 +2415,7 @@ public static Result callSetLogLevel(String level) throws Exception {

Gson gson = new Gson();

HttpUriRequest post = RequestBuilder.get().setUri(url).build();
HttpUriRequest post = RequestBuilder.post().setUri(url).build();

HttpResponse response = client.execute(post);

Expand Down Expand Up @@ -2519,8 +2519,7 @@ public static boolean createApplication(String appName) {
boolean result = false;

try {

HttpUriRequest post = RequestBuilder.post().setUri(ROOT_SERVICE_URL+"/applications?appName="+appName)
HttpUriRequest post = RequestBuilder.post().setUri(ROOT_SERVICE_URL+"/admin/applications/"+appName)
.setHeader(HttpHeaders.CONTENT_TYPE, "application/json")
.build();

Expand Down Expand Up @@ -2550,7 +2549,7 @@ public static boolean deleteApplication(String appName) {

try {

HttpUriRequest delete = RequestBuilder.delete().setUri(ROOT_SERVICE_URL +"/applications/"+appName)
HttpUriRequest delete = RequestBuilder.delete().setUri(ROOT_SERVICE_URL +"/admin/applications/"+appName)
.setHeader(HttpHeaders.CONTENT_TYPE, "application/json")
.build();

Expand Down Expand Up @@ -2578,7 +2577,7 @@ public static boolean deleteApplication(String appName) {
public static Applications getApplications() {
try {

HttpUriRequest get = RequestBuilder.get().setUri(ROOT_SERVICE_URL+"/getApplications")
HttpUriRequest get = RequestBuilder.get().setUri(ROOT_SERVICE_URL+"/applications")
.setHeader(HttpHeaders.CONTENT_TYPE, "application/json")
.build();

Expand Down

0 comments on commit b4c7781

Please sign in to comment.