Opened 3 years ago

Closed 3 years ago

#529 closed defect (fixed)

systemtests for server errors with wget

Reported by: pcampalani Owned by: pcampalani
Priority: minor Milestone: Future
Component: systemtest Version: development
Keywords: wget http 500 Cc: dmisev, pbaumann, abeccati
Complexity: Easy


wget, which is used to fetch the responses in the systemtests (see run_test() in ./systemtest/util/, does not seem capable of fetching the response content in case of 500 HTTP exit code. See

This way, it won't be possible to test error conditions like it is done by WCS tests 21 and 22:


..since the response stored in output/ will be empty and will not match the oracle which instead contains the exception message.

curl might be considered as alternative, although it must be added in the installation requirements of rasdaman.

Change History (10)

comment:1 Changed 3 years ago by pcampalani

According to:, it should be possible in the next release of wget.

comment:2 Changed 3 years ago by dmisev

I think wget would get the error code though, in that case we could test if it's 500?

comment:3 Changed 3 years ago by pcampalani

Yes that's the only option now, with wget.

comment:4 Changed 3 years ago by dmisev

Ok let's make it like that. I suggest the oracle would have the expected code in it (500) and extension .oracle.code instead of just .oracle, what do you think?

comment:5 Changed 3 years ago by pcampalani

Or why not using a .sh companion which extracts the exit code and put it in the output/ test, instead of adding again an other suffix?

comment:6 Changed 3 years ago by dmisev

Not sure if it will be possible to get the code, because the custom check script is called only for verifying the result against the oracle, you can't use it to make the request itself.

comment:7 Changed 3 years ago by pcampalani

Ok, then ok to add an other suffix: .code is ok for me.

comment:8 Changed 3 years ago by pcampalani

  • Owner changed from dmisev to pcampalani
  • Status changed from new to assigned

I will prepend a .error to the suffix of a query which is meant to raise an exception, so that it will be easy to recognize error-prone tests in queries/ as well, e.g.:

--- queries/21-get_coverage_jp2_irregular_axis.kvp 
+++ queries/21-get_coverage_jp2_irregular_axis.error.kvp

The test engine will test the exit code of wget to be 8 in this case.

comment:9 Changed 3 years ago by pcampalani

  • Status changed from assigned to accepted

comment:10 Changed 3 years ago by pcampalani

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in changeset:441d48d (..and changeset:3d3a588).
Wiki updated: Adding Tests.

Note: See TracTickets for help on using tickets.