Beispiel #1
0
 def test_migration_after_live_migration(self):
     set_migration_started('yellow', self.slug, dry_run=True)
     self.assertFalse(migration_in_progress('yellow', self.slug))
     self.assertTrue(
         migration_in_progress('yellow', self.slug, include_dry_runs=True))
     # Live migration finishes ... and is completed with normal migration
     set_migration_started('yellow', self.slug)
     self.assertTrue(migration_in_progress('yellow', self.slug))
 def test_dry_run(self):
     set_migration_started('yellow', self.slug, True)
     self.assertFalse(get_migration_complete('yellow', self.slug))
     self.assertFalse(migration_in_progress('yellow', self.slug))
     self.assertTrue(migration_in_progress('yellow', self.slug, True))
     self.assertEqual(get_migration_status('yellow', self.slug),
                      MigrationStatus.DRY_RUN)
     self.assertEqual(get_migration_status('yellow', 'otherslug'),
                      MigrationStatus.NOT_STARTED)
Beispiel #3
0
 def test_dry_run(self):
     set_migration_started('yellow', self.slug, True)
     self.assertFalse(get_migration_complete('yellow', self.slug))
     self.assertFalse(migration_in_progress('yellow', self.slug))
     self.assertTrue(migration_in_progress('yellow', self.slug, True))
     self.assertEqual(get_migration_status('yellow', self.slug),
                      MigrationStatus.DRY_RUN)
     self.assertEqual(get_migration_status('yellow', 'otherslug'),
                      MigrationStatus.NOT_STARTED)
Beispiel #4
0
 def test_continue_live_migration(self):
     set_migration_started('yellow', self.slug, dry_run=True)
     self.assertFalse(migration_in_progress('yellow', self.slug))
     self.assertTrue(
         migration_in_progress('yellow', self.slug, include_dry_runs=True))
     # Live migration finishes ... and is continued later
     set_migration_started('yellow', self.slug, dry_run=True)
     self.assertFalse(migration_in_progress('yellow', self.slug))
     self.assertTrue(
         migration_in_progress('yellow', self.slug, include_dry_runs=True))
Beispiel #5
0
    def test_dry_run(self):
        set_migration_started('yellow', self.slug, dry_run=True)
        self.assertFalse(get_migration_complete('yellow', self.slug))
        self.assertFalse(migration_in_progress('yellow', self.slug))
        self.assertTrue(migration_in_progress('yellow', self.slug, True))
        self.assertEqual(get_migration_status('yellow', self.slug),
                         MigrationStatus.DRY_RUN)
        self.assertEqual(get_migration_status('yellow', 'otherslug'),
                         MigrationStatus.NOT_STARTED)

        progress = self.get_progress('yellow')
        self.assertIsNotNone(progress.started_on)
        self.assertLessEqual(progress.started_on, datetime.utcnow())
    def test_dry_run(self):
        set_migration_started('yellow', self.slug, dry_run=True)
        self.assertFalse(get_migration_complete('yellow', self.slug))
        self.assertFalse(migration_in_progress('yellow', self.slug))
        self.assertTrue(migration_in_progress('yellow', self.slug, True))
        self.assertEqual(get_migration_status('yellow', self.slug),
                         MigrationStatus.DRY_RUN)
        self.assertEqual(get_migration_status('yellow', 'otherslug'),
                         MigrationStatus.NOT_STARTED)

        progress = self.get_progress('yellow')
        self.assertIsNotNone(progress.started_on)
        self.assertLessEqual(progress.started_on, datetime.utcnow())
Beispiel #7
0
def timezone_migration_in_progress(domain):
    return migration_in_progress(domain, TZMIGRATION_SLUG)
Beispiel #8
0
def couch_sql_migration_in_progress(domain, include_dry_runs=True):
    return migration_in_progress(domain, COUCH_TO_SQL_SLUG, include_dry_runs)
Beispiel #9
0
def couch_sql_migration_in_progress(domain, include_dry_runs=True):
    return migration_in_progress(domain, COUCH_TO_SQL_SLUG, include_dry_runs)
Beispiel #10
0
def timezone_migration_in_progress(domain):
    return migration_in_progress(domain, TZMIGRATION_SLUG)