Skip to content

Commit

Permalink
Fixup error message about event_time_start and event_time_end
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Oct 3, 2024
1 parent ee994c1 commit ca9b381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/dbt/cli/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def wrapper(*args, **kwargs):

if event_time_end is not None and event_time_start >= event_time_end:
raise DbtRuntimeError(

Check warning on line 753 in core/dbt/cli/params.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/cli/params.py#L752-L753

Added lines #L752 - L753 were not covered by tests
"Value for `--event-time-end` must be less than `--event-time-end`"
"Value for `--event-time-start` must be less than `--event-time-end`"
)
elif event_time_start >= datetime.now():
raise DbtRuntimeError(

Check warning on line 757 in core/dbt/cli/params.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/cli/params.py#L756-L757

Added lines #L756 - L757 were not covered by tests
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/cli/test_option_interaction_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def test_option_combo(self, project, event_time_start, event_time_end, expect_pa
assert expect_pass
except Exception as e:
assert (
"Value for `--event-time-end` must be less than `--event-time-end`" in e.__str__()
"Value for `--event-time-start` must be less than `--event-time-end`"
in e.__str__()
)
assert not expect_pass

Expand Down

0 comments on commit ca9b381

Please sign in to comment.