master^2
王兵 4 years ago
parent 1deac6bb49
commit 11f32be230

Binary file not shown.

@ -16,6 +16,10 @@ import xyz.wbsite.module.admin.req.ServicesCreateRequest;
import xyz.wbsite.module.admin.rsp.LocationsCreateResponse; import xyz.wbsite.module.admin.rsp.LocationsCreateResponse;
import xyz.wbsite.module.admin.rsp.ServicesCreateResponse; import xyz.wbsite.module.admin.rsp.ServicesCreateResponse;
import javax.validation.constraints.AssertTrue;
import static junit.framework.TestCase.assertTrue;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest @SpringBootTest
@Transactional @Transactional
@ -35,11 +39,12 @@ public class DataInit {
servicesCreateRequest.setTitle("默认主机"); servicesCreateRequest.setTitle("默认主机");
servicesCreateRequest.setDomain("location"); servicesCreateRequest.setDomain("location");
servicesCreateRequest.setPort(80); servicesCreateRequest.setPort(80);
servicesCreateRequest.setType("反向代理");
servicesCreateRequest.setValid(true); servicesCreateRequest.setValid(true);
servicesCreateRequest.setFilter(false); servicesCreateRequest.setFilter(false);
servicesCreateRequest.setFilterConf(""); servicesCreateRequest.setFilterConf("");
ServicesCreateResponse servicesCreateResponse = servicesManager.create(servicesCreateRequest, token); ServicesCreateResponse servicesCreateResponse = servicesManager.create(servicesCreateRequest, token);
assertTrue(!servicesCreateResponse.hasError());
{ {
LocationsCreateRequest locationsCreateRequest = new LocationsCreateRequest(); LocationsCreateRequest locationsCreateRequest = new LocationsCreateRequest();
locationsCreateRequest.setServicesId(servicesCreateResponse.getId()); locationsCreateRequest.setServicesId(servicesCreateResponse.getId());
@ -49,7 +54,20 @@ public class DataInit {
locationsCreateRequest.setFilter(false); locationsCreateRequest.setFilter(false);
locationsCreateRequest.setFilterConf(""); locationsCreateRequest.setFilterConf("");
LocationsCreateResponse locationsCreateResponse = locationsManager.create(locationsCreateRequest, token); LocationsCreateResponse locationsCreateResponse = locationsManager.create(locationsCreateRequest, token);
assertTrue(!locationsCreateResponse.hasError());
} }
} }
String[] strings1 = {"worker_processes","auto", "处理进程数","(auto)|([0-9]*)"};
String[] strings2 = {"worker_connections","51200", "最大并发链接数","[0-9]*"};
String[] strings3 = {"keepalive_timeout","60", "连接超时时间","[0-9]*"};
String[] strings4 = {"gzip","60", "是否开启压缩传输","on|off"};
String[] strings5 = {"gzip_min_length","1", "KB最小压缩文件","[0-9]*"};
String[] strings6 = {"gzip_comp_level","2", "压缩率","[0-9]*"};
String[] strings7 = {"client_max_body_size","100", "MB最大上传文件","[0-9]*"};
String[] strings8 = {"server_names_hash_bucket_size","512", "服务器名字的hash表大小","[0-9]*"};
String[] strings9 = {"client_body_buffer_size","51200", "KB请求主体缓冲区","[0-9]*"};
String[] strings10 = {"underscores_in_headers","on", "开启下划线头部信息","on|off"};
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.