diff --git a/server/test/com/cloud/upgrade/UsageEvents218To224UpgradeTest.java b/server/test/com/cloud/upgrade/UsageEvents218To224UpgradeTest.java index 15d6f5f7a4c..7f72559d5d8 100644 --- a/server/test/com/cloud/upgrade/UsageEvents218To224UpgradeTest.java +++ b/server/test/com/cloud/upgrade/UsageEvents218To224UpgradeTest.java @@ -74,8 +74,8 @@ public class UsageEvents218To224UpgradeTest extends TestCase { pstmt = conn.prepareStatement("SELECT COUNT(*) FROM usage_event"); rs = pstmt.executeQuery(); - assert rs.next() : "Unable to get the count of network offerings."; - assert (rs.getInt(1) == 37) : "Didn't find 7 network offerings but found " + rs.getInt(1); + assert rs.next() : "Unable to get the count of usage events"; + assert (rs.getInt(1) == 37) : "Didn't find 37 usage events but found " + rs.getInt(1); rs.close(); pstmt.close(); diff --git a/setup/db/db/schema-21to22.sql b/setup/db/db/schema-21to22.sql index cfd9f4e8bfd..b9e6bdd1680 100755 --- a/setup/db/db/schema-21to22.sql +++ b/setup/db/db/schema-21to22.sql @@ -568,7 +568,7 @@ DELETE FROM `cloud`.`sync_queue`; DELETE FROM `cloud`.`sync_queue_item`; DELETE FROM `cloud`.`async_job`; UPDATE `cloud`.`vm_template` SET unique_name='routing-xenserver-2.4',type='SYSTEM' WHERE name='systemvm-xenserver-2.4'; -DELETE FROM template_host_ref WHERE install_path LIKE '%xs-tools%' +DELETE FROM template_host_ref WHERE install_path LIKE '%xs-tools%'; DELETE FROM configuration where name='upgrade.url'; DELETE FROM configuration where name='router.template.id'; INSERT INTO configuration (category, instance, component, name, value, description) @@ -584,8 +584,8 @@ INSERT INTO vm_template (id, unique_name, name, public, created, type, hvm, bits VALUES (10, 'routing', 'SystemVM Template', 0, now(), 'ext3', 0, 64, 1, 'http://download.cloud.com/releases/2.2/systemvm.vhd.bz2', 'bcc7f290f4c27ab4d0fe95d1012829ea', 0, 'SystemVM Template', 'VHD', 15, 0, 1); Update configuration set name='storage.max.volume.size' where name='max.volume.size.mb'; INSERT INTO sequence (name, value) - VALUES ('snapshots_seq', '1') -UPDATE cloud.sequence SET value=IF((SELECT COUNT(*) FROM cloud.snapshots) > 0, (SELECT max(id) FROM cloud.snapshots) + 1, 1) WHERE name='snapshots_seq' + VALUES ('snapshots_seq', '1'); +UPDATE cloud.sequence SET value=IF((SELECT COUNT(*) FROM cloud.snapshots) > 0, (SELECT max(id) FROM cloud.snapshots) + 1, 1) WHERE name='snapshots_seq'; UPDATE configuration set name='direct.attach.security.groups.enabled' where name='direct.attach.network.groups.enabled'; UPDATE configuration set name='guest.domain.suffix' where name='domain.suffix'; @@ -608,4 +608,4 @@ ALTER TABLE `cloud`.`remote_access_vpn` ADD INDEX `i_remote_access_vpn_addr`(`vp ALTER TABLE `cloud`.`vpn_users` ADD CONSTRAINT `fk_vpn_users___account_id` FOREIGN KEY `fk_vpn_users__account_id` (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE; ALTER TABLE `cloud`.`vpn_users` ADD INDEX `i_vpn_users_username`(`username`); -ALTER TABLE `cloud`.`vpn_users` ADD UNIQUE `i_vpn_users__account_id__username`(`account_id`, `username`); \ No newline at end of file +ALTER TABLE `cloud`.`vpn_users` ADD UNIQUE `i_vpn_users__account_id__username`(`account_id`, `username`);