Is there a rule about whether geoserver unit/integration tests should be
able to run without internet connection?
No written rule, but the practice is to mark a test that needs to talk to a server
(remote or local, does not matter) or fetch a remote file as an OnlineTest.
However sometimes a test accesses the internet without the developer even being
aware of it, and they are hard to spot because it’s uncommon to do a build in a fully
isolated environment (happens to me when I try to hack on a plane, but that’s pretty much it,
and have to prepare the machine in advance to make sure maven already has all
the jars it needs).
Couldn’t find anything, but it
seems that most are with only a few exceptions: one method in CSW and a
number of fairly recent WCS tests…
Do you have a list?
Because of those few exceptions you
can’t build geoserver without internet, unless you turn unit tests off.
This could be a problem for some building servers that disallow remote
access.
For the case of a build server, maven itself needs internet access, e.g, to get artifacts when version change, or
when a new dependency is added.
Unless you’re thinking about a situation where there is also a dedicated and accessible repository manager,
which can access the internet on behalf of maven.
I guess it could be useful to have a build checking if the code can be built without
internet connection, guessing it would first need an online pass making maven load
everything it needs, and then disconnect the network and run the tests.
Not sure if feasible though (thinking about Travis for example).
In all cases the problem seems to be related to the downloading of XSD
schemes. The problem should be able to be resolved by either including
the right XSD’s somewhere in the classpath (well, in the right place,
eh), or just remove the references to them in the XML files. I already
did this for the CSW test: https://github.com/geoserver/geoserver/pull/3414
Yes, this is the common way to do fix that problem.
Cheers
Andrea
···
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.