-
Notifications
You must be signed in to change notification settings - Fork 16
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
test: RPC provider API key modifications #269
Conversation
@@ -581,4 +586,43 @@ mod test { | |||
let api_key = ApiKey("55555".to_string()); | |||
assert!(format!("{api_key:?}") == "{API_KEY}"); | |||
} | |||
|
|||
#[test] | |||
fn test_bool_storable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than adding those tests regarding implementation of Storable
, wouldn't it be better to just update to the latest version of stable structure and remove those wrappers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I timeboxed trying to use the latest version of ic-stable-structures
, and the issue that I ran into was that all of the latest versions which implement Storable
for Principal
and bool
use Candid 10.x, which conflicts with transitive dependencies from the forked cketh-minter
branch.
After spending quite a lot of time trying to work around this (and running into more and more version conflicts), it might make sense to wait until after we can drop the cketh-minter
dependency before making this change in another PR. However, I was able to remove StringStorable
to simplify the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Candid 10.x, which conflicts with transitive dependencies from the forked cketh-minter branch.
ha I see, another good reason to drop that dependency 😅.
it might make sense to wait until after we can drop the cketh-minter dependency before making this change in another PR
Sure that sounds ok to me. I'm trying to also push on that front, since it will be needed when we want to implement something new (e.g. 3-out-of-4 strategy)
…ic-eth-rpc into test-nns-providers
…ic-eth-rpc into test-nns-providers
Merging and will make any follow-up changes in additional PRs. |
Follow-up testing and bugfixes for #252.
This PR...
RpcAuth::BearerToken
.None
removes it.RpcAccess::Unauthenticated
BoolStorable
andPrincipalStorable
.StringStorable
.requestCost
canister method to return0
when in demo mode.BoolStorable
had an inverted condition infrom_bytes
getProviderCost()
returnedNat
instead ofResult<Nat, RpcError>
in the state machine test logicNote that the canister upgrade tests use the same Wasm before and after upgrade. In the future (probably out of scope of this PR), we could extend this to test upgrading from the most recently deployed canister's Wasm file.