Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packit_service/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __eq__(self, other: object) -> bool:
if not isinstance(other, MRTarget):
raise NotImplementedError()

return self.repo == other.repo and self.branch == self.branch
return self.repo == other.repo and self.branch == other.branch


class ServiceConfig(Config):
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def test_parse_valid(service_config_valid):
assert config.package_config_path_override is None


def test_mr_target_membership_respects_branch(service_config_valid):
config = ServiceConfig.get_from_dict(service_config_valid)
assert MRTarget("redhat/centos-stream/src/.+", "c9s") in config.gitlab_mr_targets_handled
assert (
MRTarget("redhat/centos-stream/src/.+", "rawhide") not in config.gitlab_mr_targets_handled
)


def test_parse_optional_values(service_config_valid):
"""When optional values are set, they are correctly parsed"""
config = ServiceConfig.get_from_dict(
Expand Down
Loading