diff options
author | Hengye <yehui.wang@est.tech> | 2019-11-27 13:43:42 +0800 |
---|---|---|
committer | Hengye <yehui.wang@est.tech> | 2019-12-11 11:30:28 +0800 |
commit | b53f17e933de95d6a397313ad04f1c67b18a27da (patch) | |
tree | 63aaf842c16e200cb0b1bb0e3ad500e61489e9b9 /main/src/test/java | |
parent | d97629ff8ec522d30d1f552201496182c72559ab (diff) |
consolidate Policy Health Check into PAP
Issue-ID: POLICY-1689
Change-Id: I3b84094e217c8cda115efdbf3444e92f08013a7c
Signed-off-by: Hengye <yehui.wang@est.tech>
Diffstat (limited to 'main/src/test/java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java | 2 | ||||
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckControllerV1.java | 38 |
2 files changed, 39 insertions, 1 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java index 8660d005..3823365b 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java @@ -72,7 +72,7 @@ public class CommonPapRestServer { public static final String NOT_ALIVE = "not alive"; public static final String ALIVE = "alive"; - public static final String SELF = "self"; + public static final String SELF = NetworkUtil.getHostname(); public static final String NAME = "Policy PAP"; public static final String ENDPOINT_PREFIX = "policy/pap/v1/"; diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckControllerV1.java new file mode 100644 index 00000000..f73178b7 --- /dev/null +++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckControllerV1.java @@ -0,0 +1,38 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2019 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.pap.main.rest; + +import org.junit.Test; + +/** + * Class to perform unit test of {@link PolicyComponentsHealthCheckControllerV1}. + * + * @author Yehui Wang (yehui.wang@est.tech) + */ +public class TestPolicyComponentsHealthCheckControllerV1 extends CommonPapRestServer { + + private static final String ENDPOINT = "components/healthcheck"; + + @Test + public void testSwagger() throws Exception { + super.testSwagger(ENDPOINT); + } +} |