Steve,
I just tried to follow your instructions in order to run the
ids.server test suite. I get the following error:
------------------------- start test output --------------------------
Running org.icatproject.ids.TestICATGetter
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.181 sec <<< FAILURE! - in org.icatproject.ids.TestICATGetter
testGetService(org.icatproject.ids.TestICATGetter) Time elapsed: 0.18 sec <<< ERROR!
org.icatproject.IcatException_Exception: Unable to connect to:
https://smfisher:8181
at org.icatproject.ids.ICATGetter.throwSessionException(ICATGetter.java:106)
at org.icatproject.ids.ICATGetter.getService(ICATGetter.java:85)
at org.icatproject.ids.TestICATGetter.testGetService(TestICATGetter.java:27)
-------------------------- end test output ---------------------------
Indeed, "
https://smfisher:8181" doesn't look much like a valid URL, so
failure to connect isn't surprising. Contrary to what the
instructions state, the tests does not seem to take the URL from
~/.m2/settings.xml. In the corresponding source code, I read:
------- src/test/java/org/icatproject/ids/TestICATGetter.java: -------
@Test
public void testGetService() throws Exception {
ICAT icat = ICATGetter.getService("
https://smfisher:8181");
System.out.println(icat.getApiVersion());
}
----------------------------------------------------------------------
I tried the sources at the v1.7.0 tag as well as the HEAD of the
master branch. When I edit this code and set the URL to my test
server, I get another error:
------------------------- start test output --------------------------
Running org.icatproject.ids.TestICATGetter
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.219 sec <<< FAILURE! - in org.icatproject.ids.TestICATGetter
testGetService(org.icatproject.ids.TestICATGetter) Time elapsed: 0.216 sec <<< ERROR!
org.icatproject.IcatException_Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.icatproject.ids.ICATGetter.throwSessionException(ICATGetter.java:106)
at org.icatproject.ids.ICATGetter.getService(ICATGetter.java:62)
at org.icatproject.ids.TestICATGetter.testGetService(TestICATGetter.java:27)
-------------------------- end test output ---------------------------
So it seems that the javax.net.ssl.trustStore setting in
~/.m2/settings.xml is also not taken into account.
Furthermore, if I look into the properties files in
src/test/resources, there are plenty of settings that certainly will
not work in my environment, such as:
icat.url =
https://smfisher:8181
cache.dir = /home/fisher/ids/cache/
ids.url=
https://smfisher:8181
glassfish=/home/fisher/pf/glassfish4
I have no idea whether these properties files are actually used in any
test though.
So, at the moment, it seems that I'm not able to get the tests running
here.
Best,
Rolf
--
Rolf Krahl <
rolf....@helmholtz-berlin.de>
Helmholtz-Zentrum Berlin für Materialien und Energie (HZB)
Albert-Einstein-Str. 15, 12489 Berlin
Tel.:
+49 30 8062 12122