Skip to content

Commit

Permalink
Add Smoke Test
Browse files Browse the repository at this point in the history
  • Loading branch information
strangelookingnerd committed Mar 29, 2024
1 parent feebeef commit 3399a19
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
Expand Down
22 changes: 22 additions & 0 deletions src/test/java/io/jenkins/plugins/httpclient5/SmokeTest.java
Original file line number Diff line number Diff line change
@@ -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());
}
}

0 comments on commit 3399a19

Please sign in to comment.