package cd.casic.server;

import cd.casic.ci.process.dto.resp.shuimu.ShuiMuProjectVersionResp;
import cd.casic.ci.process.process.service.shuimu.ShuiMuService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest(classes = {OpsServerApplication.class})
@ActiveProfiles("local")
@Slf4j
public class ShuiMuTest {
    @Resource
    ShuiMuService shuiMuService;
    @Test
    public void getToken(){
        System.out.println(shuiMuService.getToken());
    }
    @Test
    public void imageList(){
        System.out.println(shuiMuService.imageList("java"));
    }
    @Test
    public void readWfuzzJsonFile(){
        System.out.println(shuiMuService.readWfuzzJsonFile("6"));
    }
    @Test
    public void readHelpersJsonFile(){
        System.out.println(shuiMuService.readHelpersJsonFile("6"));
    }
    @Test
    public void getProjectVersion(){
        ShuiMuProjectVersionResp projectVersion = shuiMuService.getProjectVersion("6");
        System.out.println(projectVersion);
        System.out.println(projectVersion.getRepo());
    }
    @Test
    public void getProjectInfo(){
        System.out.println(shuiMuService.getProjectInfo("4"));
    }
}
