----- Original Message -----
From: "Tomas Kyjovsky" <tkyjovsk(a)redhat.com>
To: keycloak-dev(a)lists.jboss.org
Sent: Monday, 15 June, 2015 7:14:03 PM
Subject: [keycloak-dev] Propagating system props to keycloak.json on WildFly
While working on arquillian adapter tests I hit a problem when deploying some
of the test servlets to standalone WF.
The original AdapterTest sets some system props that are later used by
"session-portal" and "input-portal": [1-3].
AdapterTest.java:
// Test that replacing system properties works for adapters
System.setProperty("app.server.base.url",
"http://localhost:8081");
System.setProperty("my.host.name", "localhost");
App's keycloak.json:
"auth-server-url" : "http://${my.host.name}:8081/auth",
While this works on embedded container, with a standalone WF I get this error
during deployment:
IllegalArgumentException: Illegal character in authority at index 7:
http://${my.host.name}:8180/auth
Any ideas on how to proceed?
Do I just need to set the actual values in keycloak.json before test as it is
done for the other test apps?
Yes, if I remember correctly if the sys prop doesn't exist it just leaves it alone
(and http://${my.host.name}:8180/auth isn't a valid url).
Actually, we need to make sure that this test (or another test) uses this property as
that's a feature of keycloak.json that you can refer to sys props and env variables.