Skip to content

Commit

Permalink
Fix regression on error-msg matching on functests
Browse files Browse the repository at this point in the history
The error message comes from pulpcore and contained a typo.
When it was fixed [0], our test failed to match.

Ideally we would want to have Error Codes, but at this point it
would be too costly to implement that.

[0] pulp/pulpcore#5935
  • Loading branch information
pedro-psb authored and ggainey committed Nov 13, 2024
1 parent 5d81100 commit 3aa4310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pulp_rpm/tests/functional/api/test_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ def test_object_creation(
assert e.value.status == 400
# What key should this error be under? non-field-errors seems wrong
assert json.loads(e.value.body) == {
"non_field_errors": [f"Objects must all be apart of the {domain_name} domain."]
"non_field_errors": [f"Objects must all be a part of the {domain_name} domain."]
}

with pytest.raises(ApiException) as e:
sync_body = {"remote": default_remote.pulp_href}
rpm_repository_api.sync(repo.pulp_href, sync_body)
assert e.value.status == 400
assert json.loads(e.value.body) == {
"non_field_errors": [f"Objects must all be apart of the {domain_name} domain."]
"non_field_errors": [f"Objects must all be a part of the {domain_name} domain."]
}


Expand Down

0 comments on commit 3aa4310

Please sign in to comment.