deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <>
Subject Re: CIMI tests rewrite to minitest (rev 4)
Date Tue, 07 Aug 2012 00:05:58 GMT
On Fri, 2012-08-03 at 15:15 +0200, wrote:
> Hi,
> Sorry for rev 4, but I fixed more tests to use rubygems builderplate
> and consolidated helpers re-definitions.

ACK. I get one test failure:

  1) Failure:
test_0001_can be constructed from XML and JSON(MachineImage model)
XML documents do not match
entries differ[/MachineImage[0]/property[0]/name]: "locked" != "status"
entries differ[/MachineImage[0]/property[0]/content]: "true" != "BUILD"
entries differ[/MachineImage[0]/property[1]/name]: "status" != "locked"
entries differ[/MachineImage[0]/property[1]/content]: "BUILD" != "true"

That's because the machine_image fixture has two properties, and in Ruby
1.8, hashes do not preserve any sort of order; even though we tried very
hard to work around that fact, those workarounds are defeated by the
fact that JSON.parse maps properties to a hash.

Rather than work around that, the attached patch addresses this by
special-casing properties when comparing XML/JSON representations.


View raw message