Skip to content

Commit fa23210

Browse files
authored
Fix test for newer Jenkins versions (#227)
Dashboard string is not always included in the root page of the Jenkins controller, nor should the test require that it is included. It is enough to check that the page contains the well-known URL of the Jenkins website.
1 parent 3711389 commit fa23210

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/io/jenkins/plugins/httpclient/RobustHTTPClientIntegrationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public void createRobustHTTPClient() throws Exception {
6767
@Test
6868
public void testDownloadFile() throws Exception {
6969
client.downloadFile(f, j.getURL(), TaskListener.NULL);
70-
assertThat(Files.readString(f.toPath()), containsString("<title>Dashboard [Jenkins]</title>"));
70+
// Jenkins controller root page should always contain at lease one reference to Jenkins web site
71+
assertThat(Files.readString(f.toPath()), containsString("https://www.jenkins.io/"));
7172
}
7273

7374
/**

0 commit comments

Comments
 (0)