新增下载平台的test方法,调用下载调度器的文件

segment2.0
linrf 2 years ago
parent 3113551d99
commit 27a4404a05

@ -1,11 +1,9 @@
package com.docus.server;
import com.docus.server.api.scheduling.management.FileApi;
import com.docus.server.common.download.downLoader.HttpDownloader;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
/**
* API
*
@ -15,11 +13,13 @@ import javax.annotation.Resource;
@SpringBootTest
public class FileController {
@Resource
private FileApi fileApi;
@Test
void test() {
void test() throws Exception {
HttpDownloader httpDownloader = new HttpDownloader(null);
String url = "http://192.168.16.110:9113/sch/file/download2?filePath=collector_packages/20230718/64cdaf49-f45e-4435-b6a3-3466165e7e3b/docus-collector-scheduling.tar.gz";
String fileName = "test.tar.gz";
String savePath = "h:\\test";
httpDownloader.downLoadFromUrl(url, fileName, savePath);
}
}

Loading…
Cancel
Save