优化文件配置,去掉 region 的配置,通过自动识别

This commit is contained in:
YunaiV
2022-03-19 18:02:20 +08:00
parent 34a7399a65
commit 813069abf4
21 changed files with 28 additions and 43 deletions

View File

@ -228,7 +228,7 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest {
}
@Test
public void testFileConfig() {
public void testFileConfig() throws Exception {
// mock 数据
FileConfigDO dbFileConfig = randomFileConfigDO().setMaster(false);
fileConfigMapper.insert(dbFileConfig);// @Sql: 先插入出一条存在的数据

View File

@ -70,7 +70,7 @@ public class FileServiceTest extends BaseDbUnitTest {
}
@Test
public void testCreateFile_success() {
public void testCreateFile_success() throws Exception {
// 准备参数
String path = randomString();
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
@ -95,7 +95,7 @@ public class FileServiceTest extends BaseDbUnitTest {
}
@Test
public void testDeleteFile_success() {
public void testDeleteFile_success() throws Exception {
// mock 数据
FileDO dbFile = randomPojo(FileDO.class, o -> o.setConfigId(10L).setPath("tudou.jpg"));
fileMapper.insert(dbFile);// @Sql: 先插入出一条存在的数据
@ -123,7 +123,7 @@ public class FileServiceTest extends BaseDbUnitTest {
}
@Test
public void testGetFileContent() {
public void testGetFileContent() throws Exception {
// 准备参数
Long configId = 10L;
String path = "tudou.jpg";