X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fintegrationtest%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fintegrationtest%2FNorthboundIT.java;h=602de9a1c6f28f8e195ed0aa00c78bd82f3da434;hb=55c40fd972a68ae81a1c6b8a3e4977e2aa838464;hp=f6714480c9971d47fba99dac3f445f61f507c037;hpb=47c8b781b163ccf652a043e060582ec1904787d4;p=controller.git diff --git a/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java b/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java index f6714480c9..602de9a1c6 100644 --- a/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java +++ b/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java @@ -45,7 +45,7 @@ import org.opendaylight.controller.sal.topology.TopoEdgeUpdate; import org.opendaylight.controller.switchmanager.IInventoryListener; import org.opendaylight.controller.usermanager.IUserManager; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; +import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.util.PathUtils; import org.osgi.framework.Bundle; @@ -310,7 +310,7 @@ public class NorthboundIT { JSONTokener jt = new JSONTokener(result); JSONObject json = new JSONObject(jt); JSONArray subnetConfigs = json.getJSONArray("subnetConfig"); - Assert.assertEquals(subnetConfigs.length(), 0); + Assert.assertEquals(subnetConfigs.length(), 1); // should only get the default subnet // Test GET subnet1 expecting 404 result = getJsonResult(baseURL + "default/subnet/" + name1); @@ -859,10 +859,11 @@ public class NorthboundIT { JSONObject node = json.getJSONObject("node"); Assert.assertEquals(node.getString("type"), "STUB"); Assert.assertEquals(node.getString("id"), "51966"); - // test adding same flow again fails due to repeat name..return 409 + // test adding same flow again succeeds with a change in any field ..return Success // code + fc = "{\"name\":\"test1\", \"node\":{\"id\":\"51966\",\"type\":\"STUB\"}, \"actions\":[\"LOOPBACK\"]}"; result = getJsonResult(baseURL + "node/STUB/51966/staticFlow/test1", "PUT", fc); - Assert.assertTrue(result.equals("409")); + Assert.assertTrue(result.equals("Success")); fc = "{\"name\":\"test2\", \"node\":{\"id\":\"51966\",\"type\":\"STUB\"}, \"actions\":[\"DROP\"]}"; result = getJsonResult(baseURL + "node/STUB/51966/staticFlow/test2", "PUT", fc);