Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

IS-1230: getPReps returns error with high end ranking. #521

Merged
merged 4 commits into from
Sep 24, 2020

Conversation

cow-hs
Copy link
Contributor

@cow-hs cow-hs commented Sep 22, 2020

Invalid case

  • zero startRanking
  • zero endRanking
  • reverse

else:
normal case

fixes icon-project/icon-rpc-server#147

endRanking <= 0: Invalid params
endRanking > # of candidates (nomal case)
@@ -633,3 +633,147 @@ def check_query_via_icx_sendtransaction(self, method: str, params: dict, expecte
func_name=method,
params=params)
return self.process_confirm_block_tx([tx], expected_status=expected_status)

def test_get_preps_normal(self):
Copy link
Member

@goldworm-icon goldworm-icon Sep 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to add the following test-cases

  1. startRanking or endRanking are less than zero
  2. startRanking is larger than # of PReps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

append test case.

pass case

  • normal
  • over endRanking than prep count

else:

  • reverse
  • overflow
  • zero
  • negative

cow-hs and others added 2 commits September 24, 2020 10:04
edit raise exception message
* Change ranking verification code
* Update unit-tests for getPReps
@cow-hs cow-hs merged commit 95d2242 into develop Sep 24, 2020
@cow-hs cow-hs deleted the IS-1230-get-preps-return-error-with-high-end-ranking branch September 24, 2020 10:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants