添加多运行环境支持 #14

Open
xiaohai2271 wants to merge 36 commits from feat-multlyEnv#13 into master-old
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 47df223655 - Show all commits

View File

@@ -327,7 +327,7 @@ public class BaseTest {
}
@Slf4j
public static class TestQiniuFileServiceImpl implements FileManager {
public static class TestFileManager implements FileManager {
@Override
public FileResponse uploadFile(InputStream is, String fileName) {
FileResponse response = new FileResponse();

View File

@@ -116,8 +116,7 @@ public class UserControllerTest extends BaseTest {
assertNotNull(inputStream);
// mock 实现类
// FIXME mock 时不应该为 qiniuService
// mockInjectInstance(userService, "fileService", (FileService) TestQiniuFileServiceImpl::new);
mockInjectInstance(userService, "fileService", (FileService) TestFileManager::new);
MockMultipartFile file = new MockMultipartFile("file", "logo.png", MediaType.IMAGE_PNG_VALUE, inputStream);
getMockData(multipart("/user/imgUpload").file(file), userLogin()).andDo(result -> {