summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-02-02 11:36:53 +0000
committeradheli.tavares <adheli.tavares@est.tech>2024-02-07 14:13:37 +0000
commit5f37a80fa7df9fc5605ee9182f0706b430aec5e1 (patch)
treea79a5c09d72f238342ba1638ba5e860637408a41
parent10723a70523318b2ce9ac7011489687f491036e6 (diff)
Fix RestController usage after removing AAF filter
- some of AAF filter were attached to deprecated dmaap dependency Issue-ID: POLICY-4402 Change-Id: Iba3cf4de5da685ecda7a718b4eb44d1b199942d8 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionRestServer.java17
-rw-r--r--main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java2
-rw-r--r--packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json3
3 files changed, 10 insertions, 12 deletions
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionRestServer.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionRestServer.java
index 4673f383..c85994d8 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionRestServer.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/rest/TestDistributionRestServer.java
@@ -1,9 +1,8 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Copyright (C) 2019 Nordix Foundation.
* Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,7 +67,7 @@ class TestDistributionRestServer {
"HealthCheckReport(name=Policy SSD, url=" + SELF + ", healthy=true, code=200, message=alive)";
final var main = startDistributionService();
final var report = performHealthCheck();
- validateReport(NAME, SELF, true, 200, ALIVE, reportString, report);
+ validateReport(true, 200, ALIVE, reportString, report);
assertThatCode(() -> stopDistributionService(main)).doesNotThrowAnyException();
}
@@ -79,10 +78,10 @@ class TestDistributionRestServer {
"HealthCheckReport(name=Policy SSD, url=" + SELF + ", healthy=false, code=500, message=not alive)";
final var restServerParams = new CommonTestData().getRestServerParameters(port);
restServerParams.setName(CommonTestData.DISTRIBUTION_GROUP_NAME);
- final var restServer = new RestServer(restServerParams, null, DistributionRestController.class);
+ final var restServer = new RestServer(restServerParams, DistributionRestController.class);
restServer.start();
final var report = performHealthCheck();
- validateReport(NAME, SELF, false, 500, NOT_ALIVE, reportString, report);
+ validateReport(false, 500, NOT_ALIVE, reportString, report);
assertTrue(restServer.isAlive());
assertThat(restServer.toString()).startsWith("RestServer(servers=");
assertThatCode(restServer::shutdown).doesNotThrowAnyException();
@@ -113,10 +112,10 @@ class TestDistributionRestServer {
return invocationBuilder.get(HealthCheckReport.class);
}
- private void validateReport(final String name, final String url, final boolean healthy, final int code,
- final String message, final String reportString, final HealthCheckReport report) {
- assertEquals(name, report.getName());
- assertEquals(url, report.getUrl());
+ private void validateReport(final boolean healthy, final int code,
+ final String message, final String reportString, final HealthCheckReport report) {
+ assertEquals(TestDistributionRestServer.NAME, report.getName());
+ assertEquals(TestDistributionRestServer.SELF, report.getUrl());
assertEquals(healthy, report.isHealthy());
assertEquals(code, report.getCode());
assertEquals(message, report.getMessage());
diff --git a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java
index ffe0c8d5..a99b1e3f 100644
--- a/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java
+++ b/main/src/test/java/org/onap/policy/distribution/main/rest/TestHttpsDistributionRestServer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Intel. All rights reserved.
- * Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json b/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json
index 5cdb99ec..830c2c2d 100644
--- a/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json
+++ b/packages/policy-distribution-tarball/src/main/resources/etc/defaultConfig.json
@@ -63,8 +63,7 @@
"keyStorePath": "null",
"keyStorePassword": "null",
"activeserverTlsAuth": false,
- "isFilterinEmptyResources": true,
- "isUseHttpsWithDmaap": false
+ "isFilterinEmptyResources": true
}
}
},