<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-security</artifactId>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
ONAP
================================================================================
Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
- Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
+ Modifications Copyright (C) 2019, 2023-2025 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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=========================================================
-->
<groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>cds</artifactId>
<version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<version>${policy.common.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.onap.aai.schema-service</groupId>
- <artifactId>aai-schema</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
- <artifactId>blueprint-proto</artifactId>
- </dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java-util</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.toolchain</groupId>
- <artifactId>jetty-jakarta-servlet-api</artifactId>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
* simulators
* ================================================================================
* Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019, 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2019, 2023-2025 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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=========================================================
*/
public static final int SDNCSIM_SERVER_PORT = 6670;
public static final int CDSSIM_SERVER_PORT = 6671;
- private static final String CANNOT_PROCESS_PARAMETERS = "cannot parse parameters ";
private static final String CANNOT_CONNECT = "cannot connect to port ";
public static final String LOCALHOST = "localhost";
* 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=========================================================
*/
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc;
import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc.BluePrintProcessingServiceStub;
* wait for the prior server to shut down.
*/
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
int port = NetworkUtil.allocPort();
sim = new CdsSimulator(Util.LOCALHOST, port);
sim.start();
+ assertTrue(NetworkUtil.isTcpPortOpen(Util.LOCALHOST, port, 200, 250L));
}
@AfterEach
- public void tearDown() {
+ void tearDown() {
sim.stop();
}
@Test
+ @Order(1)
void test() throws Exception {
- String reqstr = IOUtils.toString(Objects.requireNonNull(getClass().getResource("cds/cds.request.json")),
+ String requestStr = IOUtils.toString(
+ Objects.requireNonNull(getClass().getResource("cds/cds.request.json")),
StandardCharsets.UTF_8);
Builder builder = ExecutionServiceInput.newBuilder();
- JsonFormat.parser().ignoringUnknownFields().merge(reqstr, builder);
+ JsonFormat.parser().ignoringUnknownFields().merge(requestStr, builder);
ExecutionServiceInput request = builder.build();
ManagedChannel channel = NettyChannelBuilder.forAddress(Util.LOCALHOST, sim.getPort()).usePlaintext().build();
}
@Test
+ @Order(2)
void testGetResponse() throws IOException, CoderException {
CdsSimulator cdsSimulator = new CdsSimulator(Util.LOCALHOST, sim.getPort());
String reqstr = ResourceUtils.getResourceAsString(