Skip to content

Commit

Permalink
Add testing requirements to Release json representation
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Verga <[email protected]>
  • Loading branch information
mattiaverga committed Nov 22, 2024
1 parent 250cec5 commit 2dc23f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bodhi-server/bodhi/server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,8 @@ class Release(Base):

__tablename__ = 'releases'
__exclude_columns__ = ('id', 'builds', 'composes')
__include_extras__ = ('setting_status', )
__include_extras__ = ('critpath_mandatory_days_in_testing', 'mandatory_days_in_testing',
'critpath_min_karma', 'min_karma', 'setting_status', )
__get_by__ = ('name', 'long_name', 'dist_tag')

name = Column(Unicode(10), unique=True, nullable=False)
Expand Down
9 changes: 8 additions & 1 deletion devel/ci/integration/tests/test_bodhi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,8 +1127,15 @@ def test_get_compose_json(bodhi_container, db_container):
compose['content_type'] = updates[0]['builds'][0]['content_type']
else:
compose['content_type'] = None
# We can't get this from db
# We can't get these from db
release['setting_status'] = http_response.json()['compose']['release']['setting_status']
release['min_karma'] = http_response.json()['compose']['release']['min_karma']
release['critpath_min_karma'] = \
http_response.json()['compose']['release']['critpath_min_karma']
release['mandatory_days_in_testing'] = \
http_response.json()['compose']['release']['mandatory_days_in_testing']
release['critpath_mandatory_days_in_testing'] = \
http_response.json()['compose']['release']['critpath_mandatory_days_in_testing']

compose['release'] = release
compose['update_summary'] = []
Expand Down

0 comments on commit 2dc23f6

Please sign in to comment.