1
1
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:
secwall 2017-04-06 02:34:18 +03:00
parent 20633e6dde
commit bea8e41739
3 changed files with 13 additions and 1 deletions

View File

@ -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>

View File

@ -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

View File

@ -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