]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix unittest that relies on no longer existing domain
authorZipeng WU <zipeng.wu@sonarsource.com>
Thu, 29 Dec 2022 15:11:34 +0000 (16:11 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 29 Dec 2022 20:03:08 +0000 (20:03 +0000)
server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookCustomDnsTest.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/webhook/ws/WebhookSupportTest.java

index 52aa46cd632e7a708fac8d6097ecb7c784f8d31b..c5fe9025a9a44765887f375a3e104f30b8cd79b7 100644 (file)
@@ -108,7 +108,7 @@ public class WebhookCustomDnsTest {
     when(networkInterfaceProvider.getNetworkInterfaceAddresses())
       .thenThrow(new SocketException());
 
-    Assertions.assertThatThrownBy(() -> underTest.lookup("good-url.com"))
+    Assertions.assertThatThrownBy(() -> underTest.lookup("sonarsource.com"))
       .hasMessageContaining("Network interfaces could not be fetched.")
       .isInstanceOf(IllegalArgumentException.class);
   }
index 9592d46438dd0ab0c294814398ca68711c2262bd..9caa0c77db39d260b6cee9c7376f030b16e9009d 100644 (file)
@@ -111,7 +111,7 @@ public class WebhookSupportTest {
   public void itThrowsIllegalExceptionIfGettingNetworkInterfaceAddressesFails() throws SocketException {
     when(networkInterfaceProvider.getNetworkInterfaceAddresses()).thenThrow(new SocketException());
 
-    assertThatThrownBy(() -> underTest.checkUrlPattern("https://good-url.com", "msg"))
+    assertThatThrownBy(() -> underTest.checkUrlPattern("https://sonarsource.com", "msg"))
       .hasMessageContaining("Can not retrieve a network interfaces")
       .isInstanceOf(IllegalStateException.class);