Preserve login routes across rotation and keep rejected migrations read-only
This commit is contained in:
@@ -97,3 +97,14 @@ def test_migration_rolls_back_every_table_on_bad_source(mysql, tmp_path):
|
||||
migrate_sqlite(tmp_path / 'bad.db', mysql)
|
||||
assert mysql.overview()['records'] == 0
|
||||
assert mysql.overview()['scores'] == 0
|
||||
|
||||
|
||||
def test_rejected_migration_cli_does_not_pause_destination_jobs(mysql, tmp_path):
|
||||
import subprocess
|
||||
import sys
|
||||
source = Database(tmp_path / 'source.db')
|
||||
mysql.job_create('existing-running-job', {'year': 2027})
|
||||
mysql.job_update('existing-running-job', status='running')
|
||||
result = subprocess.run([sys.executable, '-m', 'studio.migrate', str(source.path), '--config', os.environ['STUDIO_MYSQL_TEST_CONFIG']], capture_output=True, text=True)
|
||||
assert result.returncode != 0
|
||||
assert mysql.job_get('existing-running-job')['status'] == 'running'
|
||||
|
||||
Reference in New Issue
Block a user