diff --git a/pom.xml b/pom.xml index c3c61d7..c2477c8 100644 --- a/pom.xml +++ b/pom.xml @@ -108,6 +108,7 @@ https://repo.jenkins-ci.org/public/ + repo.jenkins-ci.org diff --git a/src/test/java/io/jenkins/plugins/httpclient5/SmokeTest.java b/src/test/java/io/jenkins/plugins/httpclient5/SmokeTest.java new file mode 100644 index 0000000..ad80a0e --- /dev/null +++ b/src/test/java/io/jenkins/plugins/httpclient5/SmokeTest.java @@ -0,0 +1,22 @@ +package io.jenkins.plugins.httpclient5; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.net.URI; +import org.apache.hc.client5.http.fluent.Request; +import org.apache.hc.client5.http.fluent.Response; +import org.apache.hc.core5.http.HttpStatus; +import org.junit.jupiter.api.Test; +import org.jvnet.hudson.test.JenkinsRule; +import org.jvnet.hudson.test.junit.jupiter.WithJenkins; + +@WithJenkins +class SmokeTest { + + @Test + void smokeTest(JenkinsRule r) throws Exception { + URI uri = r.getURL().toURI(); + Response response = Request.get(uri).execute(); + assertEquals(HttpStatus.SC_OK, response.returnResponse().getCode()); + } +}