github_zeekling/src/test/java/com/zeekling/blog/BlogUpdateTest.java

28 lines
710 B
Java
Raw Normal View History

2020-07-25 15:04:33 +00:00
package com.zeekling.blog;
2020-07-26 12:08:17 +00:00
import com.zeekling.util.GitHubs;
import org.json.JSONObject;
import org.testng.annotations.Test;
2020-07-25 15:04:33 +00:00
/**
* @author zeekling [lingzhaohui@zeekling.cn]
* @version 1.0
* @apiNote
* @since 2020-07-25
*/
public class BlogUpdateTest {
2020-07-26 12:08:17 +00:00
@Test
public void updateGitHub(){
2022-04-15 12:07:04 +00:00
String configPath = "/home/zeekling/project/ling/github_zeekling/src/main/resources/blog.properties";
2021-03-29 13:17:56 +00:00
BlogUpdateService updateService = new BlogUpdateServiceImpl(configPath);
int res = updateService.update();
if (res == 0){
System.out.println("update github success!");
2020-07-26 12:08:17 +00:00
return;
}
2021-03-29 13:17:56 +00:00
System.out.println("update github failed!");
2020-07-26 12:08:17 +00:00
}
2020-07-25 15:04:33 +00:00
}