Fix for NorthboundIT test failure
[controller.git] / opendaylight / northbound / integrationtest / src / test / java / org / opendaylight / controller / northbound / integrationtest / NorthboundIT.java
index dff17ff086f07d67282486a28e526f93725281d2..dfc4b4978ae2114d0a2c6815e79b37ed5c7c41bf 100644 (file)
@@ -486,38 +486,11 @@ public class NorthboundIT {
         testNodeConnectorProperties(nodeConnectorProperties, nodeConnectorId_3, ncType, nodeId_3, nodeType, ncState,
                 ncCapabilities, ncBandwidth);
 
-        // Test delete node property
-        // Delete timestamp property from node1
-        result = getJsonResult(baseURL + "node/STUB/" + nodeId_1 + "/property/timeStamp", "DELETE");
-        Assert.assertEquals(200, httpResponseCode.intValue());
-
-        // Check node1
-        result = getJsonResult(baseURL + "nodes");
-        jt = new JSONTokener(result);
-        json = new JSONObject(jt);
-        node = getJsonInstance(json, "nodeProperties", nodeId_1);
-        Assert.assertNotNull(node);
-        testNodeProperties(node, nodeId_1, nodeType, null, null, actionsValue_1, capabilitiesValue_1, tablesValue_1,
-                buffersValue_1);
-
-        // Delete actions property from node2
-        result = getJsonResult(baseURL + "node/STUB/" + nodeId_2 + "/property/actions", "DELETE");
-        Assert.assertEquals(200, httpResponseCode.intValue());
-
-        // Check node2
-        result = getJsonResult(baseURL + "nodes");
-        jt = new JSONTokener(result);
-        json = new JSONObject(jt);
-        node = getJsonInstance(json, "nodeProperties", nodeId_2);
-        Assert.assertNotNull(node);
-        testNodeProperties(node, nodeId_2, nodeType, timestamp_1, timestampName_1, null, capabilitiesValue_1,
-                tablesValue_1, buffersValue_1);
-
         // Test add property to node
-        // Add Tier and Bandwidth property to node1
+        // Add Tier and Description property to node1
         result = getJsonResult(baseURL + "node/STUB/" + nodeId_1 + "/property/tier/1001", "PUT");
         Assert.assertEquals(201, httpResponseCode.intValue());
-        result = getJsonResult(baseURL + "node/STUB/" + nodeId_1 + "/property/bandwidth/1002", "PUT");
+        result = getJsonResult(baseURL + "node/STUB/" + nodeId_1 + "/property/description/node1", "PUT");
         Assert.assertEquals(201, httpResponseCode.intValue());
 
         // Test for first node
@@ -527,7 +500,7 @@ public class NorthboundIT {
         node = getJsonInstance(json, "nodeProperties", nodeId_1);
         Assert.assertNotNull(node);
         Assert.assertEquals(1001, node.getJSONObject("properties").getJSONObject("tier").getInt("tierValue"));
-        Assert.assertEquals(1002, node.getJSONObject("properties").getJSONObject("bandwidth").getInt("bandwidthValue"));
+        Assert.assertEquals("node1", node.getJSONObject("properties").getJSONObject("description").getString("descriptionValue"));
 
         // Test delete nodeConnector property
         // Delete state property of nodeconnector1
@@ -1154,11 +1127,11 @@ public class NorthboundIT {
                 .append("dstNodeConnector",
                         nodeConnectorType_2 + "|" + nodeConnectorId_2 + "@" + nodeType_2 + "|" + nodeId_2);
         // execute HTTP request and verify response code
-        result = getJsonResult(baseURL + "/userLink", "POST", jo.toString());
+        result = getJsonResult(baseURL + "/user-link", "POST", jo.toString());
         Assert.assertTrue(httpResponseCode == 201);
 
         // === test GET method for getUserLinks()
-        result = getJsonResult(baseURL + "/userLink", "GET");
+        result = getJsonResult(baseURL + "/user-link", "GET");
         Assert.assertTrue(httpResponseCode == 200);
         if (debugMsg) {
             System.out.println("result:" + result);
@@ -1203,12 +1176,12 @@ public class NorthboundIT {
 
         // === test DELETE method for deleteUserLink()
         String userName = "userLink_1";
-        result = getJsonResult(baseURL + "/userLink/" + userName, "DELETE");
+        result = getJsonResult(baseURL + "/user-link/" + userName, "DELETE");
         Assert.assertTrue(httpResponseCode == 200);
 
         // execute another getUserLinks() request to verify that userLink_1 is
         // removed
-        result = getJsonResult(baseURL + "/userLink", "GET");
+        result = getJsonResult(baseURL + "/user-link", "GET");
         Assert.assertTrue(httpResponseCode == 200);
         if (debugMsg) {
             System.out.println("result:" + result);
@@ -1346,6 +1319,7 @@ public class NorthboundIT {
                 mavenBundle("commons-codec", "commons-codec"),
                 mavenBundle("virgomirror", "org.eclipse.jdt.core.compiler.batch", "3.8.0.I20120518-2145"),
                 mavenBundle("eclipselink", "javax.persistence", "2.0.4.v201112161009"),
+                mavenBundle("eclipselink", "javax.resource", "1.5.0.v200906010428"),
 
                 mavenBundle("orbit", "javax.activation", "1.1.0.v201211130549"),
                 mavenBundle("orbit", "javax.annotation", "1.1.0.v201209060031"),