Skip to content

Cover edge cases in Registrar Pallet E2E tests#633

Merged
rockbmb merged 25 commits into
open-web3-stack:masterfrom
naijauser:629-complete-registrar-tests
Jun 24, 2026
Merged

Cover edge cases in Registrar Pallet E2E tests#633
rockbmb merged 25 commits into
open-web3-stack:masterfrom
naijauser:629-complete-registrar-tests

Conversation

@naijauser

@naijauser naijauser commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Closes #629

This PR covers the following additional edge cases:

register

  • User with insufficient balance cannot register para
  • Cannot register para with validation code < MIN_CODE_SIZE
  • Cannot register para with validation code > MAX_CODE_SIZE
  • Cannot register para with genesis head > MAX_HEAD_DATA_SIZE
  • Cannot register already registered para

deregister

  • Deregistering an already-deregistered (non-existent) para fails with NotRegistered

add_lock / remove_lock

  • Manager cannot lock an already-locked para
  • Manager cannot remove lock
  • Attempting to remove lock on a non-existent paraId is a no-op
  • Test the add_lock / remove_lock cycle from the perspective of the para manager

swap

  • Root origin can initiate and confirm a swap between two Parachains
  • Para origin can initiate and confirm a swap between two Parachains
  • Swapping a non-existent para ID fails with NotRegistered

schedule_code_upgrade

  • Para itself can schedule a code upgrade even when locked
  • Scheduling a code upgrade for a non-existent para fails with NotRegistered

set_current_head

  • Setting the current head for a non-existent para fails with NotRegistered

@naijauser naijauser marked this pull request as ready for review June 8, 2026 12:30
@naijauser

Copy link
Copy Markdown
Contributor Author

Hi @rockbmb, this is ready for review.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No issues found. The changes are well-structured and the new tests cover a comprehensive set of edge cases for the registrar pallet as described. The code is clear and follows existing patterns in the project.

@rockbmb rockbmb self-requested a review June 9, 2026 17:27
@rockbmb rockbmb added enhancement New feature or request e2e tests Related to end-to-end tests labels Jun 9, 2026
@rockbmb

rockbmb commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

@naijauser will take a look ASAP!

@rockbmb rockbmb force-pushed the 629-complete-registrar-tests branch from dda504d to 240ec64 Compare June 24, 2026 15:19

@rockbmb rockbmb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

@rockbmb rockbmb merged commit 6b3a7c9 into open-web3-stack:master Jun 24, 2026
17 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e tests Related to end-to-end tests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing error-path tests for registrar pallet

2 participants