Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package io.jenkins.plugins.oras.java.api;

import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.util.logging.Level;
import land.oras.ContainerRef;
import land.oras.Index;
import land.oras.Registry;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.jvnet.hudson.test.junit.jupiter.RealJenkinsExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Execution(ExecutionMode.SAME_THREAD)
class RealJenkinsTest {

/**
* Logger for this class
*/
private static final Logger LOG = LoggerFactory.getLogger(RealJenkinsTest.class);

@RegisterExtension
private final RealJenkinsExtension extension = new RealJenkinsExtension()
.withLogger("land.oras", Level.FINEST)
.withLogger(RealJenkinsTest.class, Level.FINEST);

@Test
void pullIndexTest() throws Throwable {
extension.then(r -> {
Registry registry = Registry.builder().build();
ContainerRef containerRef1 = ContainerRef.parse("ghcr.io/oras-project/oras:main");
Index index = registry.getIndex(containerRef1);
assertNotNull(index);
LOG.info("Index found: {}", index);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

@WireMockTest
@Execution(ExecutionMode.CONCURRENT)
public class SmokeTest {
class SmokeTest {
@Test
void shouldListTags(WireMockRuntimeInfo wmRuntimeInfo) {

Expand Down
Loading