Skip to content

Commit

Permalink
feat(tests): add requirement for DoS fixed in 10.1.4
Browse files Browse the repository at this point in the history
- Added internal test case int001 in reqs_conway.py
- Updated test_committee.py to include int001 test case
- Documented internal test case in chang_user_stories_template.rst
  • Loading branch information
mkoura committed Jan 28, 2025
1 parent 462c31f commit a8118d5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cardano_node_tests/tests/reqs_conway.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ def __dr(id: str) -> requirements.Req:
gr028 = __r("GR028")
gr029 = __r("GR029")

# Internal Test Cases
int001 = __r("R10_1_4")

# DB Sync Conway related tables
# https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/schema.md
db001 = __dr("drep_hash")
Expand Down
10 changes: 9 additions & 1 deletion cardano_node_tests/tests/tests_conway/test_committee.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,14 @@ def _auth_hot_keys() -> None:
_propose_new_member()
_auth_hot_keys()

reqc.int001.start(url=helpers.get_vcs_link())
subtest_errors = []
for smethod in submit_methods:
for build_method in ("build_raw", "build"):
for scenario in ("all_cc_one_unelected", "all_cc_all_unelected"):
with subtests.test(id=f"{scenario}_{build_method}_{smethod}"):
subtest_id = f"{scenario}_{build_method}_{smethod}"
subtest_errors.append(subtest_id)
with subtests.test(id=subtest_id):
with pytest.raises(
(clusterlib.CLIError, submit_api.SubmitApiError)
) as excinfo:
Expand All @@ -397,6 +401,10 @@ def _auth_hot_keys() -> None:
"to cast votes:",
err_str,
), err_str
subtest_errors.pop()

if not subtest_errors:
reqc.int001.success()

@allure.link(helpers.get_vcs_link())
@submit_utils.PARAM_SUBMIT_METHOD
Expand Down
21 changes: 21 additions & 0 deletions src_docs/chang_user_stories_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,24 @@ Governance guardrails User Stories
- As an ADA holder, when submitting an update protocol parameters proposal, the governance guardrail should prevent an unconstitutional value for `poolPledgeInfluence`.


Internal Test Cases
-------------------

.. list-table::
:widths: 18 53
:header-rows: 1

-

- Status for Test Case
- Description
-

- |image-R10_1_4|
- Prevent a potential DoS attack. Prevent invalid CC member from voting.
`<https://github.com/IntersectMBO/cardano-node/releases/tag/10.1.4>`__


DB Sync - Conway related tables
-------------------------------

Expand Down Expand Up @@ -1721,6 +1739,9 @@ DB Sync - Conway related tables
.. |image-GR029| image:: https://img.shields.io/badge/GR029-grey
:target: https://github.com/GR029-404

.. |image-R10_1_4| image:: https://img.shields.io/badge/R10_1_4-grey
:target: https://github.com/R10_1_4-404

.. |image-drep_hash| image:: https://img.shields.io/badge/drep_hash-grey
:target: https://github.com/drep_hash-404
.. |image-committee_hash| image:: https://img.shields.io/badge/committee_hash-grey
Expand Down

0 comments on commit a8118d5

Please sign in to comment.