aodn / python-aodndata

Handlers, destination path functions and any other code specific to a given facility or pipeline
GNU General Public License v3.0
0 stars 0 forks source link

build on Jenkins fails #141

Closed lbesnard closed 3 years ago

lbesnard commented 5 years ago

This PR passed travis and got merged to master successfully.

However Jenkins complains on the build

FAIL: test_push_mooring_10secs_netcdf (test_aodndata.soop.test_soop_tmv_nrt.TestSoopTmvNrtHandler)
Test to push an already created 10secs NetCDF
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/jobs/aodndata_build/workspace/test_aodndata/soop/test_soop_tmv_nrt.py", line 118, in test_push_mooring_10secs_netcdf
    self.run_handler_with_exception(InvalidFileContentError, netcdf_path)
  File "/home/jenkins/jobs/aodndata_build/workspace/aodndata_virtualenv/local/lib/python2.7/site-packages/aodncore/testlib/handlertest.py", line 54, in run_handler_with_exception
    self.assertIsInstance(handler.error, expected_error)
AssertionError: RuntimeError("Missing vessel callsign VLST from vocabulary'.",) is not an instance of <class 'aodncore.pipeline.exceptions.InvalidFileContentError'>

The failing test is this one: https://github.com/aodn/python-aodndata/blob/master/test_aodndata/soop/test_soop_tmv_nrt.py#L113

The reason is because I call run_handler_with_exception without specifying ship_callsign_ls like in other tests such as

handler = self.run_handler(GOOD_10SECS_ZIP_WITH_META,
custom_params={'ship_callsign_ls': ship_callsign_ls})

A few issues there, but at least, Travis and Jenkins should give the same result.

ghost commented 5 years ago

As discussed, the URL should be removed from being hardcoded in aodncore, and moved to config. That way, it wouldn't need to mock anything and could just load the vocab from a local test copy.

ghost commented 3 years ago

Closing, as this is old now, and builds are working...