Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jul 30, 2024
1 parent 3999984 commit 866ce73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions models/event/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ func (e *EventsTestSuite) TestEvent_IsValid() {
}

func (e *EventsTestSuite) TestEvent_TableName() {
{
// Don't pass in tableName.
evt, err := ToMemoryEvent(e.fakeEvent, idMap, &kafkalib.TopicConfig{}, config.Replication)
assert.NoError(e.T(), err)
assert.Equal(e.T(), e.fakeEvent.GetTableName(), evt.Table)
}
{
// Now pass it in, it should override.
evt, err := ToMemoryEvent(e.fakeEvent, idMap, &kafkalib.TopicConfig{TableName: "orders"}, config.Replication)
Expand Down
2 changes: 1 addition & 1 deletion models/event/events_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (e *EventsTestSuite) SetupTest() {
fakeEvent := &mocks.FakeEvent{}
fakeEvent.GetDataReturns(map[string]any{constants.DeleteColumnMarker: false, constants.OnlySetDeleteColumnMarker: false}, nil)
fakeEvent.GetColumnsReturns(&columns.Columns{}, nil)

fakeEvent.GetTableNameReturns("foo")
e.fakeEvent = fakeEvent
}

Expand Down

0 comments on commit 866ce73

Please sign in to comment.