Feature/issue 590 591 592 593 event tests#624
Open
Coredevjay wants to merge 4 commits intoSynapse-bridgez:mainfrom
Open
Feature/issue 590 591 592 593 event tests#624Coredevjay wants to merge 4 commits intoSynapse-bridgez:mainfrom
Coredevjay wants to merge 4 commits intoSynapse-bridgez:mainfrom
Conversation
Emit Event::RelayerGranted(relayer) in grant_relayer and replace the Closes Synapse-bridgez#590
|
@Coredevjay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test: event emission tests for relayer, admin, and pause operations
Closes #590
closes #591
closes #592
closes #593
What
Adds typed event assertion tests for four contract operations that previously had no event coverage, and fixes the missing RelayerGranted emission.
Changes
lib.rs
— emit Event::RelayerGranted(relayer) in grant_relayer (resolves the TODO(#3) dependency required by #590)
contract_test.rs
:
Replace weak !events.is_empty() in grant_relayer_emits_relayer_granted_event with a typed Event::RelayerGranted(relayer) assertion (#590)
Add test_revoke_relayer_emits_event — asserts Event::RelayerRevoked(relayer) is the last event (#591)
Add test_transfer_admin_emits_event — asserts Event::AdminTransferred(old, new) and that get_admin() returns the new admin (#592)
Add test_pause_emits_event — asserts Event::ContractPaused(admin) is emitted on pause (#593)
Testing
All new tests follow the existing typed event pattern (event_data helper + (Event::Variant, ledger) comparison).