]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix unittest that relies on no longer existing domain branch-8.9
authorZipeng WU <zipeng.wu@sonarsource.com>
Thu, 29 Dec 2022 15:11:34 +0000 (16:11 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 5 Jan 2023 20:02:57 +0000 (20:02 +0000)
(cherry picked from commit 06a6bcc0e6516191e004a4b105b6000e56a61ee3)

server/sonar-webserver-webapi/src/test/java/org/sonar/server/webhook/ws/WebhookSupportTest.java

index 965516da3aca95e3c5fa6b1979c37bcb89f1c3ca..1fdaad0a9f307ed252e40e3d6695afabc258e5d1 100644 (file)
@@ -27,7 +27,6 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.net.SocketException;
 import okhttp3.HttpUrl;
-import org.assertj.core.api.Assertions;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -35,7 +34,6 @@ import org.sonar.api.config.Configuration;
 import org.sonar.server.user.UserSession;
 
 import static java.util.Optional.of;
-import static org.assertj.core.api.Assertions.*;
 import static org.assertj.core.api.Assertions.assertThatCode;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.mockito.Mockito.mock;
@@ -112,7 +110,7 @@ public class WebhookSupportTest {
   public void itThrowsIllegalExceptionIfGettingNetworkInterfaceAddressesFails() throws SocketException {
     when(networkInterfaceProvider.getNetworkInterfaceAddresses()).thenThrow(new SocketException());
 
-    assertThatThrownBy(() -> underTest.checkUrlPattern("good-url.com", "msg"))
+    assertThatThrownBy(() -> underTest.checkUrlPattern("sonarsource.com", "msg"))
       .hasMessageContaining("")
       .isInstanceOf(IllegalArgumentException.class);
   }