Skip to content
Permalink
Browse files
Merge branch 'develop' into 0.1-release
  • Loading branch information
nzomkxia committed Feb 12, 2019
2 parents 7e7b2c4 + 4262b47 commit 40cc846c8ee1b04bc1fe5c7eb2e5240815330fc1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
@@ -24,6 +24,8 @@
import org.apache.dubbo.admin.model.dto.ConditionRouteDTO;
import org.apache.dubbo.admin.service.ProviderService;
import org.apache.dubbo.admin.service.RouteService;

import org.junit.After;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
@@ -52,6 +54,13 @@ public class AccessesControllerTest extends AbstractSpringIntegrationTest {
@Autowired
private ObjectMapper objectMapper;

@After
public void tearDown() throws Exception {
if (zkClient.checkExists().forPath("/dubbo") != null) {
zkClient.delete().deletingChildrenIfNeeded().forPath("/dubbo");
}
}

@Test
public void searchAccess() throws IOException {
AccessDTO accessDTO = new AccessDTO();
@@ -22,6 +22,8 @@
import org.apache.dubbo.admin.model.dto.BalancingDTO;
import org.apache.dubbo.admin.service.OverrideService;
import org.apache.dubbo.admin.service.ProviderService;

import org.junit.After;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.mock.mockito.MockBean;
@@ -56,6 +58,13 @@ public class LoadBalanceControllerTest extends AbstractSpringIntegrationTest {
@Autowired
private ObjectMapper objectMapper;

@After
public void tearDown() throws Exception {
if (zkClient.checkExists().forPath("/dubbo") != null) {
zkClient.delete().deletingChildrenIfNeeded().forPath("/dubbo");
}
}

@Test
public void createLoadbalance() throws IOException {
BalancingDTO balancingDTO = new BalancingDTO();
@@ -21,6 +21,8 @@
import org.apache.dubbo.admin.common.util.Constants;
import org.apache.dubbo.admin.model.dto.ConfigDTO;
import org.apache.dubbo.admin.service.ProviderService;

import org.junit.After;
import org.junit.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.core.ParameterizedTypeReference;
@@ -45,6 +47,13 @@ public class ManagementControllerTest extends AbstractSpringIntegrationTest {
@MockBean
private ProviderService providerService;

@After
public void tearDown() throws Exception {
if (zkClient.checkExists().forPath("/dubbo") != null) {
zkClient.delete().deletingChildrenIfNeeded().forPath("/dubbo");
}
}

@Test
public void shouldCreateGlobalConfig() throws Exception {
ConfigDTO configDTO = new ConfigDTO();

0 comments on commit 40cc846

Please sign in to comment.