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

test: add e2e test for canister request-status with different identity #4047

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

ericswanson-dfinity
Copy link
Member

We have a test for dfx canister request-status, but not one that shows the identity must match the one used with dfx canister call.


@test "request-status requires same identity" {
install_asset greet
dfx_start --artificial-delay 10000
Copy link
Contributor

Choose a reason for hiding this comment

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

Why such an artificial delay?

Copy link
Member Author

Choose a reason for hiding this comment

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

Great question! I copied this from the test above. The delays were introduced in #3920. @lwshang , do you remember?

Copy link
Contributor

Choose a reason for hiding this comment

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

Later in this test, we try to make a call asynchronously and get the request-id (in stdout):

dfx canister call --async hello_backend greet Bob

Then we request-status of the request

dfx canister request-status --output raw "$stdout" "$(dfx canister id hello_backend)"

In my PR #3920, I bumped the agent-rs dependency to v0.38 which contains this change: dfinity/agent-rs#595

Without the --artificial-delay 10000, the first step won't output the request-id, instead it will output the call result ("Hello, Bob!") directly.
Adding --artificial-delay 10000 to dfx start served as a workaround to preserve the existing test behavior.

@ericswanson-dfinity ericswanson-dfinity merged commit 8f8f45c into master Dec 19, 2024
295 checks passed
@ericswanson-dfinity ericswanson-dfinity deleted the ens/request-status-test branch December 19, 2024 14:29
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