;.
I added 'Locale.setDefault(Locale.ENGLISH);' to the ‚initParser‘ method of the
test.
Best,
Steffen
Am 19.05.2018 um 10:45 schrieb Thomas Darimont
<thomas.darimont(a)googlemail.com>:
Hello Steffen,
maven forks a new jvm for tests, so you have to explicitly pass the jvm arguments /
system properties
in the configuration of the surefire test plugin, see:
http://maven.apache.org/surefire/maven-surefire-plugin/examples/system-pr...
<
http://maven.apache.org/surefire/maven-surefire-plugin/examples/system-pr...
Would probably be a good idea to add the <argLine>-Duser.country=EN
-Duser.language=en</argLine>
to the surefire plugin config in the Keycloak build for more stable tests.
E.g:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Duser.country=EN -Duser.language=en</argLine>
</configuration>
</plugin>
</plugins>
</build>
Cheers,
Thomas
Am Fr., 18. Mai 2018 um 22:58 Uhr schrieb Steffen Kreutz <s.kreutz(a)yieldlab.de
<mailto:s.kreutz@yieldlab.de>>:
Hey Keycloak Devs,
we would like to restrict access to accounts that are managed by our company and
therefore need to send the ‚hd‘ to Google’s auth endpoint. I saw that there is already a
JIRA issue for that topic under
https://issues.jboss.org/browse/KEYCLOAK-5289
<
https://issues.jboss.org/browse/KEYCLOAK-5289>
<
https://issues.jboss.org/browse/KEYCLOAK-5289
<
https://issues.jboss.org/browse/KEYCLOAK-5289>>. If you agree, I would like to
take over it because I already implemented the change in our fork. You can find the
changes under
https://github.com/yieldlab/keycloak/tree/hosted-domain-parameter-for-goo...
<
https://github.com/yieldlab/keycloak/tree/hosted-domain-parameter-for-goo...
<
https://github.com/yieldlab/keycloak/tree/hosted-domain-parameter-for-goo...
<
https://github.com/yieldlab/keycloak/tree/hosted-domain-parameter-for-goo...;.
Unfortunately the existing tests fail on my machine and therefore I don’t want to create
a PR yet. I think this is because my system’s locale is German. The summary of the failing
test is
Failed tests:
SAMLParserTest.testInvalidEndElement
Expected: (an instance of org.keycloak.saml.common.exceptions.ParsingException and
exception with message a string containing "The element type
\"NameIDFormat\" must be terminated by the matching end-tag
\"</NameIDFormat>\".")
but: exception with message a string containing "The element type
\"NameIDFormat\" must be terminated by the matching end-tag
\"</NameIDFormat>\"." message was
"javax.xml.stream.XMLStreamException: ParseError at [row,col]:[31,11]
Message: Elementtyp "NameIDFormat" muss mit dem entsprechenden Endtag
"</NameIDFormat>" beendet werden."
This comes because the exception’s message is translated to German but the test matches
only the english version. Do you know about this? And what can I do (without changing my
system’s locale) to pass the test? I already tried to pass '-Duser.country=DE
-Duser.language=de‘ to Maven and the Maven Surefire Plugin but it didn’t help.
Best regards,
Steffen Kreutz
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org <mailto:keycloak-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
<
https://lists.jboss.org/mailman/listinfo/keycloak-dev>