mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-05 06:20:37 +00:00
Update test
This commit is contained in:
committed by
Sasha Krassovsky
parent
30064eb197
commit
3c3b53f8ad
@@ -9,19 +9,19 @@ def test_migrations(neon_simple_env: NeonEnv):
|
||||
endpoint.start()
|
||||
|
||||
with endpoint.cursor() as cur:
|
||||
cur.execute("SELECT last_value FROM neon_migration.migration_id")
|
||||
cur.execute("SELECT id FROM neon_migration.migration_id")
|
||||
migration_id = cur.fetchall()
|
||||
assert migration_id[0][0] == 2
|
||||
assert migration_id[0][0] == 1
|
||||
|
||||
endpoint.stop()
|
||||
endpoint.start()
|
||||
with endpoint.cursor() as cur:
|
||||
cur.execute("SELECT last_value FROM neon_migration.migration_id")
|
||||
cur.execute("SELECT id FROM neon_migration.migration_id")
|
||||
migration_id = cur.fetchall()
|
||||
assert migration_id[0][0] == 2
|
||||
assert migration_id[0][0] == 1
|
||||
|
||||
log_path = endpoint.endpoint_path() / "compute.log"
|
||||
with open(log_path, "r") as log_file:
|
||||
logs = log_file.read()
|
||||
assert "INFO start_compute:apply_config:handle_migrations: Ran 2 migrations" in logs
|
||||
assert "INFO start_compute:apply_config:handle_migrations: Ran 1 migrations" in logs
|
||||
assert "INFO start_compute:apply_config:handle_migrations: Ran 0 migrations" in logs
|
||||
|
||||
Reference in New Issue
Block a user