package org.opendaylight.ovsdb.integrationtest.northbound;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.Lists;
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.Inject;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-
import org.junit.runners.Parameterized;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.usermanager.IUserManager;
import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.Yaml;
-import javax.inject.Inject;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperty;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.Lists;
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
@RunWith(PaxExamParameterized.class)
@ExamReactorStrategy(PerClass.class)
@Test
public void testApi() {
System.out.println("Running " + fTestCase + "...\n");
+
Client client = Client.create();
client.addFilter(new HTTPBasicAuthFilter(USERNAME , PASSWORD));
String uri = BASE_URI + fPath;
fail("Unsupported operation");
}
assertEquals(fExpectedStatusCode, response.getStatus());
-
}
private String expand(String content){
assertTrue(this.userManager != null);
try {
- node = getTestConnection();
- } catch (IOException e) {
- e.printStackTrace();
+ node = getPluginTestConnection();
+ } catch (Exception e) {
+ fail("Exception : "+e.getMessage());
}
// Wait before making a REST call to avoid overloading Tomcat
ConfigurationBundles.controllerBundles(),
ConfigurationBundles.controllerNorthboundBundles(),
ConfigurationBundles.ovsdbLibraryBundles(),
- mavenBundle("org.opendaylight.ovsdb", "ovsdb.northbound").versionAsInProject(),
+ ConfigurationBundles.ovsdbDefaultSchemaBundles(),
+ mavenBundle("org.opendaylight.ovsdb", "ovsdb_plugin").versionAsInProject(),
+ mavenBundle("org.opendaylight.ovsdb", "ovsdb_northbound").versionAsInProject(),
junitBundles()
);
}