aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test
diff options
context:
space:
mode:
authordeepikasatheesh <deepika.s84@wipro.com>2020-11-10 04:27:55 -0800
committerdeepikasatheesh <deepika.s84@wipro.com>2020-11-10 04:27:55 -0800
commitbc0754b45540c56eeb9fc2aa2649a030136d0742 (patch)
tree9dc0fa3433f0a4ada41a3af40f0b491eccf2a323 /mso-api-handlers/mso-api-handler-infra/src/test
parent7737166117a3d41b8c1297531d2e68829bf7fbc8 (diff)
Read subnetCapabilities configuration file from SO pod
Issue-ID: SO-3372 Signed-off-by: deepikasatheesh <deepika.s84@wipro.com> Change-Id: I1055ec23b572d4f8b19ba326615248153c895227
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Onap3gppServiceInstancesTest/subnetCapability.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml5
3 files changed, 37 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java
index 95f00c3a39..14a87bf915 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/Onap3gppServiceInstancesTest.java
@@ -187,7 +187,7 @@ public class Onap3gppServiceInstancesTest extends BaseTest {
String request = "{\"subnetTypes\":[\"AN\"]}";
QuerySubnetCapability subnetCapabilityRequest = MAPPER.readValue(request, QuerySubnetCapability.class);
String expectedResponse =
- "{\"AN\":{\"latency\":\"5\",\"maxNumberofUEs\":\"100\",\"maxThroughput\":\"150\",\"terminalDensity\":\"50\"}}";
+ "{\"AN\":{\"latency\":5,\"maxNumberofUEs\":\"100\",\"maxThroughput\":\"150\",\"terminalDensity\":\"50\"}}";
Response response = objUnderTest.getSliceSubnetCapabilities(subnetCapabilityRequest, "v1");
String actualResponse = (String) response.getEntity();
assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Onap3gppServiceInstancesTest/subnetCapability.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Onap3gppServiceInstancesTest/subnetCapability.json
new file mode 100644
index 0000000000..55b3831502
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Onap3gppServiceInstancesTest/subnetCapability.json
@@ -0,0 +1,31 @@
+{
+ "AN": {
+ "latency": 5,
+ "maxNumberofUEs": "100",
+ "maxThroughput": "150",
+ "terminalDensity": "50"
+ },
+ "CN": {
+ "latency": 10,
+ "maxThroughput": "50",
+ "maxNumberofConns": "100"
+ },
+ "TN_FH": {
+ "latency": 10,
+ "maxThroughput": "100"
+ },
+ "TN_MH": {
+ "latency": 5,
+ "maxThroughput": "50"
+ },
+ "TN_BH": {
+ "latency": 10,
+ "maxThroughput": "100"
+ },
+ "AN_NF": {
+ "latency": 5,
+ "maxNumberofUEs": "100",
+ "maxThroughput": "150",
+ "terminalDensity": "50"
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
index 1429ac9b52..bcd36b8643 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
@@ -140,3 +140,8 @@ org:
adapters:
network:
encryptionKey: aa3871669d893c7fb8abbcda31b88b4f
+
+subnetCapability:
+ config:
+ file: src/test/resources/Onap3gppServiceInstancesTest/subnetCapability.json
+