Skip to content

Commit

Permalink
update squash test (#1628)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolopinto authored Aug 28, 2023
1 parent 6cf5ffd commit 8ac1069
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/auto_schema/tests/command_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,20 @@ def verify_change(c, r):
last_change = changes[-1]
# verify the last change
verify_change(last_change, r2)

# can create a new change and squash again and it works
new_change = {
"change": ChangeType.ADD_TABLE,
"metadata_lambda": lambda metadata: add_table('contact_emails', metadata),
"tables": ['accounts', 'events', 'contact_emails'],
}

# process new change, we should have 2 files now
r3 = process_change(new_change, r2, 2)

r3.squash_all("squash all")

testingutils.assert_num_files(r3, 1)


class TestPostgresCommand(CommandTest):
Expand Down

0 comments on commit 8ac1069

Please sign in to comment.