aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-30 03:36:29 +0000
committerGerrit Code Review <gerrit@onap.org>2021-06-30 03:36:29 +0000
commitba55109db1e5eea013dcffd1be29cf06fe2bbcb1 (patch)
tree4dd28ef4fe0315b7062c5bf4e01ae4606d45d2df /services/services-onappf/src/test
parent83a37986c6f40950b9c43411e9f3703acf7122fa (diff)
parent5085e4f6a3ca51ccd780464464b53e70f66baf50 (diff)
Merge "Use unique name in apex-pdp messages"
Diffstat (limited to 'services/services-onappf/src/test')
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java1
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java8
2 files changed, 5 insertions, 4 deletions
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java
index 283134087..65d901d41 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java
@@ -71,7 +71,6 @@ public class CommonApexStarterRestServer {
public static final String NOT_ALIVE = "not alive";
public static final String ALIVE = "alive";
public static final String SELF = "self";
- public static final String NAME = "Policy PDP-A";
public static final String ENDPOINT_PREFIX = "policy/apex-pdp/v1/";
private static int port;
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java
index 100db5d8d..7ccfe85b3 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/TestHealthCheckRestControllerV1.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +21,7 @@
package org.onap.policy.apex.services.onappf.rest;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import javax.ws.rs.client.Invocation;
@@ -44,15 +46,15 @@ public class TestHealthCheckRestControllerV1 extends CommonApexStarterRestServer
public void testHealthCheckSuccess() throws Exception {
final Invocation.Builder invocationBuilder = sendRequest(HEALTHCHECK_ENDPOINT);
final HealthCheckReport report = invocationBuilder.get(HealthCheckReport.class);
- validateHealthCheckReport(NAME, SELF, true, 200, ALIVE, report);
+ validateHealthCheckReport(SELF, true, 200, ALIVE, report);
// verify it fails when no authorization info is included
checkUnauthRequest(HEALTHCHECK_ENDPOINT, req -> req.get());
}
- private void validateHealthCheckReport(final String name, final String url, final boolean healthy, final int code,
+ private void validateHealthCheckReport(final String url, final boolean healthy, final int code,
final String message, final HealthCheckReport report) {
- assertEquals(name, report.getName());
+ assertThat(report.getName()).isNotBlank();
assertEquals(url, report.getUrl());
assertEquals(healthy, report.isHealthy());
assertEquals(code, report.getCode());