I'm getting test failures due to what looks like a bug in
network_test_helper.rb:
1) Error:
test_ConduitRule.build_if_remap:_Remap_with_known_product_name(ConduitRuleTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: unrecognized token:
"{I" eth0:EF{I" path ;": UPDATE "attribs" SET "jig_run_id" = 0,
"value_actual" = {I" eth0:EF{I"
path;FI"&0000:00/0000:00:02.0/0000:02:01:0;FI" speeds;F[I"
100m;FI"1g;FI" eth1;F{I" path;FI"&0000:00/0000:00:04.0/0000:02:02:0;FI"
speeds;F[I"1g;FI10g;F', "updated_at" = '2013-03-04
16:34:20.839885' WHERE "attribs"."type" IN ('BarclampCrowbar::AttribDefault')
AND "attribs"."id" = 47
This is due to NetworkTestHelper.create_node constructing a nested
Hash called nics which looks like this:
{
"eth0"=>
{"path"=>"0000:00/0000:00:02.0/0000:02:01:0", "speeds"=>["100m", "1g"]},
"eth1"=>
{"path"=>"0000:00/0000:00:04.0/0000:02:02:0", "speeds"=>["1g", "10g"]}
}
and then calling
node.set_attrib("nics", nics)
on it. ActiveRecord then attempts to serialise this as a string so it
can store it in the database, and then the sqlite3 db adapter barfs on
that string. I'm not sure how this wasn't noticed before; maybe you
guys are testing with MySQL instead?
Regardless, it seems rather odd to be attempting to serialise nested
data structures in database fields, and I don't see any
deserialization code, so I'm guessing this was unintentional?
_______________________________________________
Crowbar mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/