unit test for sfc-driver
[vfc/nfvo/driver/sfc.git] / zte / sfc-driver / sfc-driver / src / test / java / org / onap / sfc / resources / MsbServiceRegisterTest.java
1 package org.onap.sfc.resources;
2
3 import org.junit.Test;
4 import org.onap.sfc.SfcDriverConfig;
5 import org.onap.sfc.service.ConfigInfo;
6
7 /**
8  * Copyright 2018 ZTE Corporation.
9  * <p>
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  * <p>
14  * http://www.apache.org/licenses/LICENSE-2.0
15  * <p>
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 public class MsbServiceRegisterTest {
23     @Test
24     public void run() throws Exception {
25         SfcDriverConfig sfcDriverConfig = new SfcDriverConfig();
26         sfcDriverConfig.setServiceIp("127.0.0.1");
27         sfcDriverConfig.setMsbServiceUrl("http://127.0.0.0:21180/microservices");
28         ConfigInfo.setConfig(sfcDriverConfig);
29         MsbServiceRegister msbServiceRegister = new MsbServiceRegister();
30         msbServiceRegister.setSleepSeconds(1);
31         msbServiceRegister.setRetry(1);
32         msbServiceRegister.run();
33     }
34
35 }