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
8 package org.opendaylight.ovsdb.openstack.netvirt.sfc;
10 import static org.ops4j.pax.exam.CoreOptions.composite;
11 import static org.ops4j.pax.exam.CoreOptions.maven;
12 import static org.ops4j.pax.exam.CoreOptions.vmOption;
13 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
14 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
16 import org.junit.Assert;
17 import org.junit.Test;
18 import org.junit.runner.RunWith;
19 import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
20 import org.ops4j.pax.exam.Configuration;
21 import org.ops4j.pax.exam.Option;
22 import org.ops4j.pax.exam.junit.PaxExam;
23 import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
24 import org.ops4j.pax.exam.options.MavenUrlReference;
25 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
26 import org.ops4j.pax.exam.spi.reactors.PerClass;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
30 @RunWith(PaxExam.class)
31 @ExamReactorStrategy(PerClass.class)
32 public class NetvirtSfcIT extends AbstractMdsalTestBase {
33 private static final Logger LOG = LoggerFactory.getLogger(NetvirtSfcIT.class);
36 public String getModuleName() {
41 public String getInstanceName() {
42 return "netvirt-sfc-default";
46 public MavenUrlReference getFeatureRepo() {
48 .groupId("org.opendaylight.ovsdb")
49 .artifactId("openstack.net-virt-sfc-features")
50 .classifier("features")
52 .versionAsInProject();
56 public String getFeatureName() {
57 return "odl-ovsdb-sfc-ui";
62 public Option[] config() {
63 Option[] parentOptions = super.config();
64 Option[] otherOptions = getOtherOptions();
65 Option[] options = new Option[parentOptions.length + otherOptions.length];
66 System.arraycopy(parentOptions, 0, options, 0, parentOptions.length);
67 System.arraycopy(otherOptions, 0, options, parentOptions.length, otherOptions.length);
71 private Option[] getOtherOptions() {
73 vmOption("-javaagent:../jars/org.jacoco.agent.jar=destfile=../../jacoco-it.exec"),
79 public Option getLoggingOption() {
80 Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
81 logConfiguration(NetvirtSfcIT.class),
82 LogLevel.INFO.name());
83 option = composite(option, super.getLoggingOption());
88 public void testnetvirtsfcFeatureLoad() {
89 Assert.assertTrue(true);