Skip to content

Add missing error-path tests for registrar pallet #629

Description

@rockbmb

Follow-up from #572 review.

The registrar e2e tests cover successful executions, but skip several error/edge cases:

register / force_register

  • InvalidCode, CodeTooLarge, HeadDataTooLarge (input validation in validate_onboarding_data)
  • Insufficient balance for deposit delta

deregister

  • NotRegistered on non-existent para ID

remove_lock

  • Non-existent para ID (silent no-op, but unverified)
  • Unauthorized caller (e.g. the manager) -> BadOrigin

add_lock

  • Manager calling add_lock on already-locked para -> ParaLocked

add_lock / remove_lock cycle

  • Full unlock -> op succeeds -> lock -> op fails -> unlock -> op succeeds round-trip

schedule_code_upgrade

  • Para origin not tested

swap, add_lock, schedule_code_upgrade, set_current_head

  • NotRegistered on non-existent para ID

Metadata

Metadata

Assignees

Labels

e2e testsRelated to end-to-end testsenhancementNew feature or request

Type

Fields

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions