Skip to content

Commit

Permalink
Fix upsert test to detect new alter-table event
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Feb 8, 2024
1 parent c954795 commit c62cfa6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_api_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,14 @@ async def test_upsert(ds_write, initial, input, expected_rows, should_return):

# Analytics event
event = last_event(ds_write)
assert event.name == "upsert-rows"
assert event.num_rows == 1
assert event.database == "data"
assert event.table == "upsert_test"
if input.get("alter"):
assert event.name == "alter-table"
assert "extra" in event.after_schema
else:
assert event.name == "upsert-rows"
assert event.num_rows == 1

if should_return:
# We only expect it to return rows corresponding to those we sent
Expand Down

0 comments on commit c62cfa6

Please sign in to comment.