Open Kilda Java Documentation
TopologyEngineSmokeTest.java
Go to the documentation of this file.
1 /* Copyright 2017 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.smoke;
17 
18 import com.google.common.io.Resources;
19 import org.openkilda.topo.*;
20 import org.junit.Test;
21 
22 import java.io.IOException;
23 
24 import static org.junit.Assert.assertEquals;
25 
30  public static final String defaultHost = "localhost";
31 
32  @Test
39  public void testServiceUp(){
40  String entity = TopologyHelp.ClearTopology();
41  assertEquals("Default, initial, response from TopologyEngine", "{\"nodes\": []}",entity);
42  }
43 
44  @Test
49  public void testSimpleTopologyDiscovery() throws InterruptedException {
50  TestUtils.testTheTopo(Resources.getResource("topologies/partial-topology.json"));
51  }
52 
53  @Test
54  public void testMock() throws IOException {
55 // ITopology t1 = new Topology(doc);
56 // IController ctrl = new MockController(t1);
57 // ITopology t2 = ctrl.getTopology();
58 
59  }
60 }
static void testTheTopo(URL url)
Definition: TestUtils.java:215