Issue #5488 has been updated by Ben Hughes. Status changed from Unreviewed to Accepted
---------------------------------------- Bug #5488: Dashboard needs a migration test https://projects.puppetlabs.com/issues/5488 Author: Paul Berry Status: Accepted Priority: Normal Assignee: Category: Target version: Keywords: Branch: Affected URL: Affected Dashboard version: It is easy to introduce bugs in old rails migrations when adding new features (see for example http://guides.rubyonrails.org/migrations.html#using-models-in-your-migrations). To reduce this risk, we really should have an automated test of the migration logic in Dashboard. I have a few thoughts about how to accomplish this which I can expand upon if anyone is interested. The basic idea is for the automated test to do this: 1. Restore the database from a snapshot of sample data that exercises all the features we care to exercise, in the oldest database format we wish to support. 2. Run the next migration. 3. Optionally, do some database queries to verify that the data was transformed correctly. 4. Optionally, do some database updates to add data that tests newly available features. 5. If there are more migrations to test, go back to step 2. 6. Now that the data has been fully migrated, test it by querying it via the model. Once we build this test, I believe it would be pretty easy to maintain and build out incrementally over time. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
