2 * Copyright © 2015 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.ovsdb.lib.it;
11 import static org.ops4j.pax.exam.CoreOptions.composite;
12 import static org.ops4j.pax.exam.CoreOptions.maven;
13 import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperties;
14 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
16 import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
17 import org.ops4j.pax.exam.Configuration;
18 import org.ops4j.pax.exam.Option;
19 import org.ops4j.pax.exam.karaf.options.LogLevelOption;
20 import org.ops4j.pax.exam.options.MavenUrlReference;
23 * Base class for library IT.
25 public abstract class LibraryIntegrationTestBase extends AbstractMdsalTestBase {
27 public String getModuleName() {
32 public String getInstanceName() {
33 return "library-default";
37 public MavenUrlReference getFeatureRepo() {
39 .groupId("org.opendaylight.ovsdb")
40 .artifactId("library-features")
41 .classifier("features")
43 .versionAsInProject();
47 public String getFeatureName() {
48 return "odl-ovsdb-library";
53 public Option[] config() {
54 Option[] parentOptions = super.config();
55 Option[] propertiesOptions = getPropertiesOptions();
56 Option[] options = new Option[parentOptions.length + propertiesOptions.length];
57 System.arraycopy(parentOptions, 0, options, 0, parentOptions.length);
58 System.arraycopy(propertiesOptions, 0, options, parentOptions.length, propertiesOptions.length);
62 public Option[] getPropertiesOptions() {
64 propagateSystemProperties(
65 LibraryIntegrationTestUtils.SERVER_IPADDRESS,
66 LibraryIntegrationTestUtils.SERVER_PORT,
67 LibraryIntegrationTestUtils.CONNECTION_TYPE),
72 public Option getLoggingOption() {
73 Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
74 logConfiguration(getClass()),
75 LogLevelOption.LogLevel.INFO.name());
76 option = composite(option, super.getLoggingOption());