MCPcopy Create free account
hub / github.com/OreosLab/bili / testMainHandler

Method testMainHandler

src/test/java/top/misec/BiliMainTest.java:17–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15public class BiliMainTest {
16
17 @Test
18 public void testMainHandler() {
19 String config = System.getProperty("config");
20 //serverless 本地测试
21 config = ReadFileUtils.readFile("/tmp/config.json");
22 if (null == config) {
23 log.error("云函数配置的config参数为空。");
24 return;
25 }
26
27 try {
28 ConfigLoader.serverlessConfigInit(config);
29 } catch (JsonSyntaxException e) {
30 log.error("配置json格式有误,请检查是否是合法的json串", e);
31 return;
32 }
33
34
35 VersionInfo.printVersionInfo();
36 //每日任务65经验
37
38 if (!Boolean.TRUE.equals(ConfigLoader.helperConfig.getTaskConfig().getSkipDailyTask())) {
39 DailyTask dailyTask = new DailyTask();
40 dailyTask.doDailyTask();
41 } else {
42 log.info("已开启了跳过本日任务,(不会发起任何网络请求),如果需要取消跳过,请将skipDailyTask值改为false");
43 ServerPush.doServerPush();
44 }
45 }
46}

Callers

nothing calls this directly

Calls 5

readFileMethod · 0.95
serverlessConfigInitMethod · 0.95
printVersionInfoMethod · 0.95
doDailyTaskMethod · 0.95
doServerPushMethod · 0.95

Tested by

no test coverage detected