Browse Source
Resolve "Add PNC build support" Closes #12 See merge request pct-security/covscanrest!1118-scanchain-endpoint
7 changed files with 100 additions and 6 deletions
@ -0,0 +1,12 @@ |
|||||||
|
package com.redhat.pctsec.model.api.service; |
||||||
|
import jakarta.ws.rs.*; |
||||||
|
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; |
||||||
|
import org.jboss.pnc.dto.Build; |
||||||
|
|
||||||
|
@Path("pnc-rest/v2/builds") |
||||||
|
@RegisterRestClient |
||||||
|
public interface AltPncService { |
||||||
|
@GET |
||||||
|
@Path("{id}") |
||||||
|
Build getBuild(@PathParam("id") String id); |
||||||
|
} |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
package com.redhat.pctsec.model.test; |
||||||
|
|
||||||
|
import com.redhat.pctsec.model.PNCBuild; |
||||||
|
import io.quarkus.test.junit.QuarkusTest; |
||||||
|
import jakarta.inject.Inject; |
||||||
|
import org.junit.jupiter.api.Test; |
||||||
|
|
||||||
|
@QuarkusTest |
||||||
|
public class PNCBuildTest { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Test |
||||||
|
public void testBuildFetch(){ |
||||||
|
PNCBuild pb = new PNCBuild("AZAQZSPFDRQAA"); |
||||||
|
System.out.println(pb.SCMURL()); |
||||||
|
System.out.println(pb.revision()); |
||||||
|
} |
||||||
|
} |
||||||
@ -1,5 +1,6 @@ |
|||||||
package com.redhat.pctsec.model.osh; |
package com.redhat.pctsec.model.test; |
||||||
|
|
||||||
|
import com.redhat.pctsec.model.osh.paramMapper; |
||||||
import io.quarkus.test.junit.QuarkusTest; |
import io.quarkus.test.junit.QuarkusTest; |
||||||
import jakarta.inject.Inject; |
import jakarta.inject.Inject; |
||||||
import org.junit.jupiter.api.Test; |
import org.junit.jupiter.api.Test; |
||||||
Loading…
Reference in new issue