Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Context from rlandy via e-mail:
If we run the resource metadata tests against any provider other than mock, rmd3_test.rb and rmd4_test.rb will error out in the lines that determine the index of the capability under test.
Question is: do we need to write some protective code to avoid failures like:
unless rmd_coll.json["resourceMetadata"][machine_index]["capabilities"].nil?()
unless rmd_coll.json["resourceMetadata"][machine_index]["capabilities"] <includes the capability under test>
run test ....
or is it ok to assume that these tests can and will only be executed where the capabilities exist?
If we do need the protective code, the failures occur on line 38 in rmd3_test.rb and line 40 in rmd4_test.rb - where we check for the index of the capability. Since this code shows up before any it ... do ... end testpoints, using 'skip' is not suitable. Is it ok to just add the unless lines above to the tests or is there a better (more ruby-stlyish) way to skip the entire test?