Skip to content
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

Add test for invalid UTF8 #508

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

hp77-creator
Copy link
Contributor

Fixes #307

I have added a test which will check for InvalidUtf8 when the nodeId is not proper.

I tried adding separate test for InvalidUtf8 error code but Rust doesn't allow setting invalid utf-8 characters in a string. Hence have created a separate test.

@hp77-creator
Copy link
Contributor Author

@vatsa287 please check once.

pallets/node-authorization/src/tests.rs Outdated Show resolved Hide resolved
@vatsa287
Copy link
Member

@hp77-creator Please do rustfmt <file> for the format test to pass.

@hp77-creator
Copy link
Contributor Author

@hp77-creator Please do rustfmt <file> for the format test to pass.

Did it. Although I ran the following commands before submitting the PR:

  • Build - cargo build --release

  • Clippy - `cargo clippy --all --no-deps --all-targets --features=runtime-benchmarks -- -D warnings

both worked fine, so I submitted it, I guess, rustfmt should also be added in the checklist in README.md

@hp77-creator
Copy link
Contributor Author

@vatsa287 can you check this?

@amarts amarts merged commit 2dcd559 into dhiway:develop Oct 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C4GT] Node-Authorization: Add tests for InvalidUtf8
3 participants