-
Notifications
You must be signed in to change notification settings - Fork 3
chore: tests for authorization #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Implement detailed test suite for stream authorization behaviors: - Stream ownership transfer - Read permission control - Write permission control - Composition permission control The tests cover various scenarios for AUTH.01 through AUTH.04, ensuring proper access management and permission validation across different stream types.
Remove previously implemented test cases for stream authorization, including: - Ownership transfer tests - Invalid Ethereum address handling - Permissions after visibility change - Stream composition permission tests This cleanup simplifies the test suite while maintaining the core authorization contract behaviors defined in contracts_behaviors.md.
Reorganize authorization test suite by: - Creating dedicated utility packages for test procedures and setup - Extracting common helper functions into reusable methods - Improving error handling and logging in test scenarios - Simplifying test code structure and reducing duplication The changes include: - Adding `procedure` package for common test procedure calls - Adding `setup` package for contract initialization and management - Removing inline helper functions from test file - Enhancing input structs for better type safety and readability
Update common test file to use new utility packages for: - Contract setup and initialization - Metadata and procedure operations - Reducing code duplication - Improving test readability and maintainability Changes include: - Removing inline helper functions - Using new setup and procedure utility packages - Updating function signatures to use new utility structs - Cleaning up import statements
2d3402c
to
76901a1
Compare
MicBun
reviewed
Mar 3, 2025
Update authorization contract behavior identifiers in documentation and tests: - Remove dot notation from AUTH identifiers (e.g., AUTH.01 → AUTH01) - Ensure consistent identifier format across contracts_behaviors.md and test files - Maintain semantic meaning of authorization behavior descriptions
MicBun
approved these changes
Mar 3, 2025
@outerlook |
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.
Implement Authorization Contract Tests
Description
Related Problem
How Has This Been Tested?
The implementation includes new test files that verify:
Tests are run against both primitive and composed stream contracts to ensure consistent behavior.