Search in sources :

Example 11 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckClusterNodes.

@Test
public void testCheckClusterNodes() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu13");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:8000:512\n" + "10.10.53.159:8001:512\n" + "10.10.53.159:8002:512\n" + "10.10.53.159:8003:512\n" + "10.10.53.159:8004:512\n" + "10.10.53.159:8005:512\n";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 12 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo2.

/**
     * 应用实例详情格式有问题1
     */
@Test
public void testCheckWrongFormatAppInstanceInfo2() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu2");
    // 实例信息
    String appInstanceInfo = "\n10.10.53.159:6379:1024";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 13 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckAppDuplicateName.

/**
     * 重复应用名
     */
@Test
public void testCheckAppDuplicateName() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("redis-cluster-test");
    // 实例信息
    String appInstanceInfo = "";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 14 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo3.

/**
     * 应用实例详情格式有问题2
     */
@Test
public void testCheckWrongFormatAppInstanceInfo3() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu3");
    // 实例信息
    String appInstanceInfo = "10.10.53.159:6379";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Example 15 with ImportAppResult

use of com.sohu.cache.constant.ImportAppResult in project cachecloud by sohutv.

the class ImportAppCenterTest method testCheckWrongFormatAppInstanceInfo4.

/**
     * 应用实例详情格式有问题4
     */
@Test
public void testCheckWrongFormatAppInstanceInfo4() {
    // 应用信息
    AppDesc appDesc = new AppDesc();
    appDesc.setName("carlosfu4");
    // 实例信息
    String appInstanceInfo = "10.10.10.10:6379:1024";
    ImportAppResult importAppResult = importAppCenter.check(appDesc, appInstanceInfo);
    logger.info("importAppResult: {}", importAppResult);
}
Also used : ImportAppResult(com.sohu.cache.constant.ImportAppResult) AppDesc(com.sohu.cache.entity.AppDesc) BaseTest(com.sohu.test.BaseTest) Test(org.junit.Test)

Aggregations

ImportAppResult (com.sohu.cache.constant.ImportAppResult)15 AppDesc (com.sohu.cache.entity.AppDesc)15 BaseTest (com.sohu.test.BaseTest)14 Test (org.junit.Test)14 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1