Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

Commit

Permalink
Merge 2c73e63 into 0d902a7
Browse files Browse the repository at this point in the history
  • Loading branch information
Marv Cool committed Nov 19, 2014
2 parents 0d902a7 + 2c73e63 commit e934b28
Show file tree
Hide file tree
Showing 3 changed files with 2,399 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace 'test' do

desc 'creates a database suitable for testing'
task 'setup_db' do
sh "mysql --user=travis --database=racktables_test -h 127.0.0.1 < #{File.expand_path('spec/testdata/fresh_installed.sql')}"
sh "mysql --user=travis --database=racktables_test -h 127.0.0.1 < #{File.expand_path('spec/testdata/fresh_installed_0_20_8.sql')}"
end

desc 'run cucumber'
Expand Down
10 changes: 5 additions & 5 deletions spec/api/rack_object_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ def use_fixture_set
DB << "INSERT INTO TagStorage (tag_id, entity_id, entity_realm) VALUES (1,1,'object');"
DB << "INSERT INTO TagStorage (tag_id, entity_id, entity_realm) VALUES (5,1,'object');"
DB << "INSERT INTO RackSpace (rack_id, object_id) VALUES (3, 1);"

DB << "INSERT INTO Attribute VALUES (50001, 'uint', 'attr');"
DB << "INSERT INTO AttributeMap VALUES (4, 50001, NULL);"
DB << "INSERT INTO AttributeMap VALUES (4, 50001, NULL, NULL);"
DB << "INSERT INTO AttributeValue (object_id, object_tid, attr_id, uint_value) VALUES (2, 4, 50001, 10);"

DB << "INSERT INTO Attribute VALUES (50002, 'dict', 'bttr');"
DB << "INSERT INTO AttributeMap VALUES (4, 50002, 29);" # 29 is the yes/no dict
DB << "INSERT INTO AttributeMap VALUES (4, 50002, 29, NULL);" # 29 is the yes/no dict
DB << "INSERT INTO AttributeValue (object_id, object_tid, attr_id, uint_value) VALUES (2, 4, 50002, 1500);" # 1500 is yes

DB << "INSERT INTO IPv4Allocation VALUES (2, 1, 'eth0', 'regular');"
DB << "INSERT INTO IPv6Allocation VALUES (2, '1234', 'eth0', 'regular');"
end
Expand Down
Loading

0 comments on commit e934b28

Please sign in to comment.