|
|
@@ -96,7 +96,7 @@ namespace Spry.Tests {
|
|
|
* DEFAULT (the SQLite dialect cannot render a DateTime default), so
|
|
|
* existing rows keep working with a NULL epoch.
|
|
|
*/
|
|
|
- void test_m0002_sql_shape() {
|
|
|
+ void test_m0002_sql_shape() throws GLib.Error {
|
|
|
var migration = new M0002_SessionsValidAfter();
|
|
|
check(migration.serial == 2, "M0002: serial is 2 (ordered after M0001)");
|
|
|
check(migration.migration_namespace == "spry-authentication",
|
|
|
@@ -125,7 +125,7 @@ namespace Spry.Tests {
|
|
|
* M0002 down(): the column is dropped again, so the migration is
|
|
|
* reversible (losing only the epoch, never user rows).
|
|
|
*/
|
|
|
- void test_m0002_down_shape() {
|
|
|
+ void test_m0002_down_shape() throws GLib.Error {
|
|
|
var migration = new M0002_SessionsValidAfter();
|
|
|
var builder = new MigrationBuilder(new SqliteDialect());
|
|
|
migration.down(builder);
|
|
|
@@ -155,11 +155,16 @@ namespace Spry.Tests {
|
|
|
}
|
|
|
|
|
|
public int main(string[] args) {
|
|
|
+ try {
|
|
|
+ test_m0002_sql_shape();
|
|
|
+ test_m0002_down_shape();
|
|
|
+ } catch (GLib.Error e) {
|
|
|
+ failures++;
|
|
|
+ print("FAIL M0002 migration shape threw: %s\n", e.message);
|
|
|
+ }
|
|
|
test_epoch_comparison();
|
|
|
test_null_epoch_is_unix_epoch();
|
|
|
test_epoch_now_is_usable_bump();
|
|
|
- test_m0002_sql_shape();
|
|
|
- test_m0002_down_shape();
|
|
|
test_permission_matching_untouched();
|
|
|
|
|
|
print("---- %d passed, %d failed ----\n", passes, failures);
|