+
Skip to content

fix: refinements for ipv6 only testing #40723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/update-hosts/nipio-hosts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
127.0.0.1 127.0.0.1.nip.io admin.127.0.0.1.nip.io localhost-myapp.127.0.0.1.nip.io localhost-sso.127.0.0.1.nip.io realmFrontend.127.0.0.1.nip.io proxy.kc.127.0.0.1.nip.io
127.0.0.1 localtest.me 127.0.0.1.nip.io admin.127.0.0.1.nip.io localhost-myapp.127.0.0.1.nip.io localhost-sso.127.0.0.1.nip.io realmFrontend.127.0.0.1.nip.io proxy.kc.127.0.0.1.nip.io
::1 localtest.me 127.0.0.1.nip.io admin.127.0.0.1.nip.io localhost-myapp.127.0.0.1.nip.io localhost-sso.127.0.0.1.nip.io realmFrontend.127.0.0.1.nip.io proxy.kc.127.0.0.1.nip.io
16 changes: 15 additions & 1 deletion testsuite/integration-arquillian/tests/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<mvel.version>2.5.2.Final</mvel.version>
<systemrules.version>1.19.0</systemrules.version>
<common.resources>${basedir}/../../servers/auth-server/common</common.resources>
<auth.server.ipv6>false</auth.server.ipv6>
</properties>

<dependencies>
Expand Down Expand Up @@ -433,7 +434,20 @@
</build>

<profiles>


<profile>
<id>ipv6</id>
<activation>
<property>
<name>java.net.preferIPv6Addresses</name>
<value>true</value>
</property>
</activation>
<properties>
<auth.server.ipv6>true</auth.server.ipv6>
</properties>
</profile>

<profile>
<id>app-server-wildfly</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void testGetDevicesResponse() throws Exception {
List<SessionRepresentation> sessions = device.getSessions();
assertEquals(1, sessions.size());
SessionRepresentation session = sessions.get(0);
assertEquals("127.0.0.1", session.getIpAddress());
assertThat(session.getIpAddress(), anyOf(equalTo("127.0.0.1"), equalTo("0:0:0:0:0:0:0:1")));
assertTrue(device.getLastAccess() == session.getLastAccess());

List<ClientRepresentation> clients = session.getClients();
Expand Down Expand Up @@ -372,7 +372,7 @@ public void testNullOrEmptyUserAgent() throws Exception {
List<SessionRepresentation> sessions = device.getSessions();
assertEquals(1, sessions.size());
SessionRepresentation session = sessions.get(0);
assertEquals("127.0.0.1", session.getIpAddress());
assertThat(session.getIpAddress(), anyOf(equalTo("127.0.0.1"), equalTo("0:0:0:0:0:0:0:1")));
assertEquals(device.getLastAccess(), session.getLastAccess());

assertEquals(1, session.getClients().size());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.net.InetAddress;
import java.net.Inet4Address;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Collection;
Expand Down Expand Up @@ -68,7 +68,7 @@ public void accept(String name) {

assertEquals(new SimpleDateFormat("dd/MM/yyyy").parse("12/12/2016"), attributes.getValue("date").asDate(0, "dd/MM/yyyy"));

assertEquals(InetAddress.getLoopbackAddress(), attributes.getValue("ip_network_address").asInetAddress(0));
assertEquals(InetAddress.getLoopbackAddress(), attributes.getValue("host_network_address").asInetAddress(0));
assertEquals("127.0.0.1", attributes.getValue("ip_network_address").asInetAddress(0).getHostAddress());
assertEquals("localhost", attributes.getValue("host_network_address").asInetAddress(0).getHostName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
</property>
<property name="bindHttpPortOffset">${auth.server.port.offset}</property>
<property name="javaOpts">-Xms512m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=512m
-Dauth.server.db.host=some
-Dauth.server.db.host=some -Djava.net.preferIPv6Addresses=${auth.server.ipv6}
</property>
<property name="enabledFeatures">${auth.server.feature}</property>
<property name="disabledFeatures">${auth.server.feature.disable}</property>
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载