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

chore: adding neuron detection tests #902

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Conversation

NikolaMilosa
Copy link
Contributor

This PR is intended to start adding tests for our neuron detection code with hsm.

What is done:

  1. Testing of hsm detection code for Signer requirement
  2. Testing of hsm detection code for Neuron requirement
  • ATM this test fails because we can't import a dfx generated pem for a slot and use it to list neurons visible to principal and it always returns an empty vec
  1. Testing of hsm detection when a specific key is provided

@NikolaMilosa NikolaMilosa requested a review from a team as a code owner September 10, 2024 11:47
Copy link
Member

@sasa-tomic sasa-tomic left a comment

Choose a reason for hiding this comment

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

TY!

@@ -1,4 +1,4 @@
use std::{path::PathBuf, str::FromStr};
use std::{path::PathBuf, process::Command, str::FromStr};
Copy link
Member

Choose a reason for hiding this comment

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

Do we plan to use this code for non-unit tests as well?
If so, it would make sense to rename the directory from unit_tests to just plain tests since it's shorter and does not carry less information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. For the moment these are not even "unit tests", most are, but some do integrate with real services (Like governance canister). So what is your suggestion?

Copy link
Member

Choose a reason for hiding this comment

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

How about renaming to tests then?

@NikolaMilosa NikolaMilosa marked this pull request as draft September 13, 2024 12:48
@NikolaMilosa
Copy link
Contributor Author

Will mark as draft, still can't fully replicate hsm with softhsm

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.

3 participants