Move bridgedomain it to the intergationtest bundle 05/14205/2
authorSam Hague <shague@redhat.com>
Fri, 16 Jan 2015 23:51:31 +0000 (18:51 -0500)
committerFlavio Fernandes <ffernand@redhat.com>
Thu, 22 Jan 2015 13:46:39 +0000 (13:46 +0000)
Change-Id: I147ca9496f248e36fe20500f7632122833b9f35d
Signed-off-by: Sam Hague <shague@redhat.com>
integrationtest/pom.xml
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainConfigBridgeTestCases.java [moved from plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigBridgeTestCases.java with 91% similarity]
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainConfigManagerTestCases.java [moved from plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigManagerTestCases.java with 77% similarity]
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainConfigPortTestCases.java [moved from plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigPortTestCases.java with 91% similarity]
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainTestSuiteIT.java [new file with mode: 0644]
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/PluginTestBase.java [moved from plugin/src/test/java/org/opendaylight/ovsdb/plugin/PluginTestBase.java with 76% similarity]
integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/TearDown.java [moved from plugin/src/test/java/org/opendaylight/ovsdb/plugin/TearDown.java with 71% similarity]
plugin/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbPluginTestSuiteIT.java [deleted file]

index 55c5914fba26a383ee7175d5af50f73126e4791b..c3ff905a4c07abed0546ca5f9cc2372d6407e159 100644 (file)
   <packaging>jar</packaging>
 
   <dependencies>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.yaml</groupId>
       <artifactId>snakeyaml</artifactId>
similarity index 91%
rename from plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigBridgeTestCases.java
rename to integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainConfigBridgeTestCases.java
index 673c2396e7cf87827d35154e0e719713d8acecfe..4e93634efeb3ec5828acf66a15e66b0d78909085 100644 (file)
@@ -1,18 +1,19 @@
 /*
- * [[ Authors will Fill in the Copyright header ]]
  *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *  Copyright (C) 2014 Red Hat, Inc.
  *
- * Authors : Brent Salisbury, Hugo Trippaers
+ *  This program and the accompanying materials are made available under the
+ *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ *  and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Authors : Sam Hague
+ * /
  */
-package org.opendaylight.ovsdb.plugin;
+package org.opendaylight.ovsdb.integrationtest.bridgedomain;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.junit.Test;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstants;
similarity index 77%
rename from plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigManagerTestCases.java
rename to integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainConfigManagerTestCases.java
index b21233fe65fb256abf8052c8ac6a9112e87e174b..42d41bc5d2fcfae1c34994bf82ddebb9910adef2 100644 (file)
@@ -1,13 +1,15 @@
 /*
- * [[ Authors will Fill in the Copyright header ]]
  *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *  Copyright (C) 2014 Red Hat, Inc.
  *
- * Authors : Brent Salisbury, Hugo Trippaers
+ *  This program and the accompanying materials are made available under the
+ *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ *  and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Authors : Sam Hague
+ * /
  */
-package org.opendaylight.ovsdb.plugin;
+package org.opendaylight.ovsdb.integrationtest.bridgedomain;
 
 import org.junit.Test;
 import org.opendaylight.controller.sal.core.Node;
similarity index 91%
rename from plugin/src/test/java/org/opendaylight/ovsdb/plugin/BridgeDomainConfigPortTestCases.java
rename to integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainConfigPortTestCases.java
index b2ea84c7e993f6959625442a52b5dee1b5ff7943..2ca2dfef0b89b230400ef6ffe3a1f8918013869e 100644 (file)
@@ -1,19 +1,20 @@
 /*
- * [[ Authors will Fill in the Copyright header ]]
  *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *  Copyright (C) 2014 Red Hat, Inc.
  *
- * Authors : Brent Salisbury, Hugo Trippaers
+ *  This program and the accompanying materials are made available under the
+ *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ *  and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Authors : Sam Hague
+ * /
  */
-package org.opendaylight.ovsdb.plugin;
+package org.opendaylight.ovsdb.integrationtest.bridgedomain;
 
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.sal.core.Node;
@@ -21,7 +22,6 @@ import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstant
 import org.opendaylight.ovsdb.plugin.impl.ConfigurationServiceImpl;
 import org.opendaylight.ovsdb.plugin.impl.ConnectionServiceImpl;
 import org.opendaylight.ovsdb.plugin.internal.Encapsulation;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainTestSuiteIT.java b/integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/BridgeDomainTestSuiteIT.java
new file mode 100644 (file)
index 0000000..8b3652f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *
+ *  Copyright (C) 2014 Red Hat, Inc.
+ *
+ *  This program and the accompanying materials are made available under the
+ *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ *  and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Authors : Sam Hague
+ * /
+ */
+package org.opendaylight.ovsdb.integrationtest.bridgedomain;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    BridgeDomainConfigBridgeTestCases.class,
+    BridgeDomainConfigPortTestCases.class,
+    BridgeDomainConfigManagerTestCases.class,
+    TearDown.class})
+
+public class BridgeDomainTestSuiteIT {
+    static PluginTestBase.TestObjects testObjects;
+
+    public static PluginTestBase.TestObjects getTestObjects() {
+        return testObjects;
+    }
+
+    public static void setTestObjects(PluginTestBase.TestObjects testObjects) {
+        BridgeDomainTestSuiteIT.testObjects = testObjects;
+    }
+
+}
similarity index 76%
rename from plugin/src/test/java/org/opendaylight/ovsdb/plugin/PluginTestBase.java
rename to integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/PluginTestBase.java
index 8911a5b0a570cd74275ca75588cb0214b5102a43..c98e129c01693c38abc74cfc4d3e7b742e417bc0 100644 (file)
@@ -1,21 +1,25 @@
 /*
- * [[ Authors will Fill in the Copyright header ]]
  *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *  Copyright (C) 2014 Red Hat, Inc.
  *
- * Authors : Brent Salisbury, Hugo Trippaers
+ *  This program and the accompanying materials are made available under the
+ *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ *  and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Authors : Sam Hague
+ * /
  */
-package org.opendaylight.ovsdb.plugin;
+package org.opendaylight.ovsdb.integrationtest.bridgedomain;
 
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
-
 import junit.framework.Assert;
-
+import org.junit.Rule;
+import org.junit.rules.TestRule;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.core.NodeConnector;
@@ -23,8 +27,11 @@ import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
 import org.opendaylight.ovsdb.plugin.impl.ConfigurationServiceImpl;
 import org.opendaylight.ovsdb.plugin.impl.ConnectionServiceImpl;
 import org.opendaylight.ovsdb.plugin.impl.InventoryServiceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class PluginTestBase {
+    private static final Logger LOG = LoggerFactory.getLogger(PluginTestBase.class);
     private final static String identifier = "TEST";
     protected final static String BRIDGE_NAME = "JUNIT_TEST_BRIDGE";
     protected final static String PORT_NAME = "test0";
@@ -55,8 +62,8 @@ public abstract class PluginTestBase {
     }
 
     public TestObjects getTestConnection() throws IOException {
-        if (OvsdbPluginTestSuiteIT.getTestObjects() != null) {
-            return OvsdbPluginTestSuiteIT.getTestObjects();
+        if (BridgeDomainTestSuiteIT.getTestObjects() != null) {
+            return BridgeDomainTestSuiteIT.getTestObjects();
         }
         Properties props = loadProperties();
         String address = props.getProperty(SERVER_IPADDRESS);
@@ -100,8 +107,21 @@ public abstract class PluginTestBase {
             e.printStackTrace();
         }
         TestObjects testObject = new TestObjects(connectionService, node, inventory, configurationService);
-        OvsdbPluginTestSuiteIT.setTestObjects(testObject);
+        BridgeDomainTestSuiteIT.setTestObjects(testObject);
         return testObject;
     }
 
+    @Rule
+    public TestRule watcher = new TestWatcher() {
+        @Override
+        protected void starting(Description description) {
+            LOG.info("TestWatcher: Starting test: {}",
+                    description.getDisplayName());
+        }
+
+        @Override
+        protected void finished(Description description) {
+            LOG.info("TestWatcher: Finished test: {}", description.getDisplayName());
+        }
+    };
 }
similarity index 71%
rename from plugin/src/test/java/org/opendaylight/ovsdb/plugin/TearDown.java
rename to integrationtest/src/test/java/org/opendaylight/ovsdb/integrationtest/bridgedomain/TearDown.java
index e7a29cd655bd9fbe90903c21392ad56f12617efc..597289adc8c46b2ec83ee1a6e46abbd8ee6edbc9 100644 (file)
@@ -1,19 +1,20 @@
 /*
- * [[ Authors will Fill in the Copyright header ]]
  *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *  Copyright (C) 2014 Red Hat, Inc.
  *
- * Authors : Brent Salisbury, Hugo Trippaers
+ *  This program and the accompanying materials are made available under the
+ *  terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ *  and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Authors : Sam Hague
+ * /
  */
-package org.opendaylight.ovsdb.plugin;
+package org.opendaylight.ovsdb.integrationtest.bridgedomain;
 
 import org.junit.Test;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.ovsdb.plugin.impl.ConfigurationServiceImpl;
 import org.opendaylight.ovsdb.plugin.impl.ConnectionServiceImpl;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/plugin/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbPluginTestSuiteIT.java b/plugin/src/test/java/org/opendaylight/ovsdb/plugin/OvsdbPluginTestSuiteIT.java
deleted file mode 100644 (file)
index 6665a16..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2014 Red Hat, Inc.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Madhu Venugopal, Dave Tucker
- */
-package org.opendaylight.ovsdb.plugin;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.opendaylight.ovsdb.plugin.PluginTestBase.TestObjects;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    BridgeDomainConfigBridgeTestCases.class,
-    BridgeDomainConfigPortTestCases.class,
-    BridgeDomainConfigManagerTestCases.class,
-    TearDown.class})
-
-public class OvsdbPluginTestSuiteIT {
-    static TestObjects testObjects;
-
-    public static TestObjects getTestObjects() {
-        return testObjects;
-    }
-
-    public static void setTestObjects(TestObjects testObjects) {
-        OvsdbPluginTestSuiteIT.testObjects = testObjects;
-    }
-
-}