aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-alm-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-alm-client/src')
-rw-r--r--server/sonar-alm-client/src/test/java/org/sonar/alm/client/gitlab/GitlabApplicationClientTest.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/server/sonar-alm-client/src/test/java/org/sonar/alm/client/gitlab/GitlabApplicationClientTest.java b/server/sonar-alm-client/src/test/java/org/sonar/alm/client/gitlab/GitlabApplicationClientTest.java
index 4ca698cd35d..43ef628cfdd 100644
--- a/server/sonar-alm-client/src/test/java/org/sonar/alm/client/gitlab/GitlabApplicationClientTest.java
+++ b/server/sonar-alm-client/src/test/java/org/sonar/alm/client/gitlab/GitlabApplicationClientTest.java
@@ -484,7 +484,8 @@ public class GitlabApplicationClientTest {
.hasMessage("Could not validate GitLab read permission. Got an unexpected answer.");
assertThat(logTester.logs(Level.INFO).get(0))
.contains("Gitlab API call to [" + server.url("/projects") + "] " +
- "failed with error message : [Failed to connect to " + server.getHostName());
+ "failed with error message : [Failed to connect to ")
+ .contains(server.getHostName());
}
@Test
@@ -496,7 +497,8 @@ public class GitlabApplicationClientTest {
.hasMessage("Could not validate GitLab token. Got an unexpected answer.");
assertThat(logTester.logs(Level.INFO).get(0))
.contains("Gitlab API call to [" + server.url("user") + "] " +
- "failed with error message : [Failed to connect to " + server.getHostName());
+ "failed with error message : [Failed to connect to ")
+ .contains(server.getHostName());
}
@Test
@@ -508,7 +510,8 @@ public class GitlabApplicationClientTest {
.hasMessage("Could not validate GitLab write permission. Got an unexpected answer.");
assertThat(logTester.logs(Level.INFO).get(0))
.contains("Gitlab API call to [" + server.url("/markdown") + "] " +
- "failed with error message : [Failed to connect to " + server.getHostName());
+ "failed with error message : [Failed to connect to ")
+ .contains(server.getHostName());
}
@Test
@@ -520,7 +523,8 @@ public class GitlabApplicationClientTest {
.hasMessageContaining("Failed to connect to");
assertThat(logTester.logs(Level.INFO).get(0))
.contains("Gitlab API call to [" + server.url("/projects/0") + "] " +
- "failed with error message : [Failed to connect to " + server.getHostName());
+ "failed with error message : [Failed to connect to ")
+ .contains( server.getHostName());
}
@Test
@@ -529,7 +533,8 @@ public class GitlabApplicationClientTest {
assertThatThrownBy(() -> underTest.getBranches(gitlabUrl, "token", 0L))
.isInstanceOf(IllegalStateException.class)
- .hasMessageContaining("Failed to connect to " + server.getHostName());
+ .hasMessageContaining("Failed to connect to ")
+ .hasMessageContaining(server.getHostName());
assertThat(logTester.logs(Level.INFO).get(0))
.contains("Gitlab API call to [" + server.url("/projects/0/repository/branches") + "] " +
"failed with error message : [Failed to connect to " + server.getHostName());
@@ -546,7 +551,8 @@ public class GitlabApplicationClientTest {
.contains(
"Gitlab API call to [" + server.url("/projects?archived=false&simple=true&membership=true&order_by=name&sort=asc&search=&page=1&per_page=1")
+ "] " +
- "failed with error message : [Failed to connect to " + server.getHostName());
+ "failed with error message : [Failed to connect to ")
+ .contains( server.getHostName());
}
@Test