mirror of
https://github.com/yandex/pgmigrate.git
synced 2024-09-17 15:17:18 +03:00
Add testcase on comments in the end of migration file and add avmhawk to AUTHORS
This commit is contained in:
parent
20633e6dde
commit
bea8e41739
1
AUTHORS
1
AUTHORS
@ -6,3 +6,4 @@ Alexander Artemenko <art@yandex-team.ru>
|
||||
Alexander Klyuev <wizard@yandex-team.ru>
|
||||
Evgeny Dyukov <secwall@yandex-team.ru>
|
||||
Vadim Bahmatovich <bahmatovich.v@gmail.com>
|
||||
Vladimir Antipin <avmhawk@gmail.com>
|
||||
|
@ -31,6 +31,17 @@ Feature: Getting migrations from dir
|
||||
And database contains schema_version
|
||||
And migration info contains single migration
|
||||
|
||||
Scenario: Migration with comment correctly applied
|
||||
Given migration dir
|
||||
And migrations
|
||||
| file | code |
|
||||
| V1__Single_migration.sql | SELECT 1;\n\n-- Comment\n-- Comment 2\n|
|
||||
And database and connection
|
||||
When we run pgmigrate with "-t 1 migrate"
|
||||
Then pgmigrate command "succeeded"
|
||||
And database contains schema_version
|
||||
And migration info contains single migration
|
||||
|
||||
Scenario: Python format is ignored in migration text
|
||||
Given migration dir
|
||||
And migrations
|
||||
|
@ -10,7 +10,7 @@ def step_impl(context):
|
||||
for row in context.table:
|
||||
path = os.path.join(migrations_path, row['file'])
|
||||
with io.open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(row['code'])
|
||||
f.write(row['code'].replace('\\n', '\n'))
|
||||
|
||||
|
||||
@given('migration dir "{dirname}"') # noqa
|
||||
|
Loading…
Reference in New Issue
Block a user