Besides the demo WMS service used in tests being down (#11675), there are multiple errors in WmsServiceHarvestingTestCase. First, exceptions are being silenced, so the test case passes although it doesn't really test anything:
The output of that print can't be seen when running tests either. Letting the exceptions propagate, it seems to be failing because gecko driver is not installed in the docker image:
Traceback (most recent call last):
File "/usr/src/geonode/geonode/services/tests.py", line 828, in setUpClass
cls.selenium = webdriver.Firefox()
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/firefox/webdriver.py", line 67, in __init__
super().__init__(command_executor=executor, options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
self.start_session(capabilities)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 255
I was able to fix that by installing both firefox and geckodriver:
Besides the demo WMS service used in tests being down (#11675), there are multiple errors in
WmsServiceHarvestingTestCase
. First, exceptions are being silenced, so the test case passes although it doesn't really test anything:https://github.com/GeoNode/geonode/blob/e7b53a5c8c81a99104dd2aec5f0eab396c760c86/geonode/services/tests.py#L844-L846
The output of that print can't be seen when running tests either. Letting the exceptions propagate, it seems to be failing because gecko driver is not installed in the docker image:
I was able to fix that by installing both firefox and geckodriver:
After fixing that it also seems necessary to launch firefox as headless:
Last but not least, Django's
HttpResponse
has nourl
property, so these lines also throw an exception:https://github.com/GeoNode/geonode/blob/e7b53a5c8c81a99104dd2aec5f0eab396c760c86/geonode/services/tests.py#L841-L843
I guess that's probably intended to get the final URL after being redirected by register_service, but unfortunately doesn't work.
I think I can submit a PR after #11675 gets solved.