Search in sources :

Example 1 with MonitorKey

use of com.alibaba.nacos.core.remote.control.MonitorKey in project nacos by alibaba.

the class ConfigPublishGroupKeyParserTest method testParse.

@Test
public void testParse() {
    ConfigPublishRequest configPublishRequest = new ConfigPublishRequest();
    configPublishRequest.setContent("content");
    configPublishRequest.setRequestId("requestId");
    configPublishRequest.setGroup("group");
    configPublishRequest.setCasMd5("md5");
    configPublishRequest.setDataId("dataId");
    configPublishRequest.setTenant("tenant");
    MonitorKey parse = configPublishGroupKeyParser.parse(configPublishRequest);
    Assert.assertEquals("dataId+group+tenant", parse.getKey());
}
Also used : ConfigPublishRequest(com.alibaba.nacos.api.config.remote.request.ConfigPublishRequest) MonitorKey(com.alibaba.nacos.core.remote.control.MonitorKey) Test(org.junit.Test)

Example 2 with MonitorKey

use of com.alibaba.nacos.core.remote.control.MonitorKey in project nacos by alibaba.

the class ConfigPublishGroupParserTest method testParse.

@Test
public void testParse() {
    ConfigPublishRequest configPublishRequest = new ConfigPublishRequest();
    configPublishRequest.setContent("content");
    configPublishRequest.setRequestId("requestId");
    configPublishRequest.setGroup("group");
    configPublishRequest.setCasMd5("md5");
    configPublishRequest.setDataId("dataId");
    configPublishRequest.setTenant("tenant");
    MonitorKey parse = configPublishGroupParser.parse(configPublishRequest);
    Assert.assertEquals("group", parse.getKey());
}
Also used : ConfigPublishRequest(com.alibaba.nacos.api.config.remote.request.ConfigPublishRequest) MonitorKey(com.alibaba.nacos.core.remote.control.MonitorKey) Test(org.junit.Test)

Example 3 with MonitorKey

use of com.alibaba.nacos.core.remote.control.MonitorKey in project nacos by alibaba.

the class ConfigQueryGroupKeyParserTest method testParse.

@Test
public void testParse() {
    ConfigQueryRequest configQueryRequest = new ConfigQueryRequest();
    configQueryRequest.setRequestId("requestId");
    configQueryRequest.setGroup("group");
    configQueryRequest.setDataId("dataId");
    configQueryRequest.setTenant("tenant");
    MonitorKey parse = configQueryGroupKeyParser.parse(configQueryRequest);
    Assert.assertEquals("dataId+group+tenant", parse.getKey());
}
Also used : MonitorKey(com.alibaba.nacos.core.remote.control.MonitorKey) ConfigQueryRequest(com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest) Test(org.junit.Test)

Example 4 with MonitorKey

use of com.alibaba.nacos.core.remote.control.MonitorKey in project nacos by alibaba.

the class ConfigQueryGroupParserTest method testParse.

@Test
public void testParse() {
    ConfigQueryRequest configQueryRequest = new ConfigQueryRequest();
    configQueryRequest.setRequestId("requestId");
    configQueryRequest.setGroup("group");
    configQueryRequest.setDataId("dataId");
    configQueryRequest.setTenant("tenant");
    MonitorKey parse = configQueryGroupParser.parse(configQueryRequest);
    Assert.assertEquals("group", parse.getKey());
}
Also used : MonitorKey(com.alibaba.nacos.core.remote.control.MonitorKey) ConfigQueryRequest(com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest) Test(org.junit.Test)

Aggregations

MonitorKey (com.alibaba.nacos.core.remote.control.MonitorKey)4 Test (org.junit.Test)4 ConfigPublishRequest (com.alibaba.nacos.api.config.remote.request.ConfigPublishRequest)2 ConfigQueryRequest (com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest)2