aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2022-11-16 14:12:22 +0000
committerAdheli Tavares <adheli.tavares@est.tech>2022-11-17 13:01:39 +0000
commitce1e7de6148c00b00a2a48b0c2504fc8918db9dc (patch)
treef015efeb1c184c63a15bc795090fa921a830bee5 /main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java
parent6aa64b948942b402b496b84b89186bcd276ce04c (diff)
Topic names in PAP should be configurable from application.yaml
- for using Kafka instead of dmaap, topics names need to be lowercase - fix for unit/integration tests using default names and changed names for topics and group - fix for sonar lints found along the way Issue-ID: POLICY-4455 Change-Id: I89e9e6f7dbb07462f1ae497755965cb5a3f223a3 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java
index f2d33374..5d48ecc7 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeployControllerV1.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2022 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.Arrays;
+import java.util.List;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.MediaType;
@@ -36,10 +37,12 @@ import org.onap.policy.models.pdp.concepts.DeploymentGroup;
import org.onap.policy.models.pdp.concepts.DeploymentGroups;
import org.onap.policy.models.pdp.concepts.DeploymentSubGroup;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion;
+import org.springframework.test.context.ActiveProfiles;
/**
* Note: this tests failure cases; success cases are tested by tests in the "e2e" package.
*/
+@ActiveProfiles("test")
public class TestPdpGroupDeployControllerV1 extends CommonPapRestServer {
private static final String DEPLOY_GROUP_ENDPOINT = "pdps/deployments/batch";
@@ -95,10 +98,10 @@ public class TestPdpGroupDeployControllerV1 extends CommonPapRestServer {
DeploymentGroup group = new DeploymentGroup();
group.setName("drools-group");
- group.setDeploymentSubgroups(Arrays.asList(subgrp));
+ group.setDeploymentSubgroups(List.of(subgrp));
DeploymentGroups groups = new DeploymentGroups();
- groups.setGroups(Arrays.asList(group));
+ groups.setGroups(List.of(group));
return Entity.entity(groups, MediaType.APPLICATION_JSON);
}