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 ic-ref tests and universal canister wasm #5

Merged
merged 3 commits into from
Aug 5, 2020

Conversation

hansl
Copy link
Contributor

@hansl hansl commented Aug 5, 2020

No description provided.

@hansl hansl changed the title tests: add ic-ref tests and universal canister wasm test: add ic-ref tests and universal canister wasm Aug 5, 2020
@hansl
Copy link
Contributor Author

hansl commented Aug 5, 2020

This is a huge change already, so instead of making it larger I'm going to do an early review.

It is still supporting version 0.8 of the ic-ref, and I'll move to 0.9 as soon as this is in.

The ic-agent/tests/universal_canister/mod.rs (293 lines) file is a simplified copy of the same one in the dfinity repo. It's a client API match to the universal canister in the ic-ref repo.

Most lines are either just tests that pass and are copied from the ic-ref repo (from Haskell).

@hansl hansl requested a review from p-shahi August 5, 2020 21:52
@mergify mergify bot merged commit 438740f into next Aug 5, 2020
@mergify mergify bot deleted the hansl/add-more-ic-ref-tests branch August 5, 2020 21:52
@mergify mergify bot removed the automerge-squash label Aug 5, 2020
Comment on lines +22 to +25
You will also need a canister to install and run. Unfortunately, at this moment the "universal
canister" isn't made public and you will want to skip those tests if you can't build it. The
environment variable to use it is `IC_UNIVERSAL_CANISTER_PATH` and it should point to the
WASM file on disk.
Copy link
Contributor

Choose a reason for hiding this comment

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

@hansl, I’d advise you to just copy https://github.com/dfinity-lab/ic-ref/tree/master/universal-canister/ into this repo. There is nothing secret about it, and it has no stable interface, so it should be tightly coupled to it’s driver. It is not going to go well if you (in here) and @ielashi (in dfinity) continue to use the universal canister as it exists in the ic-ref repo.

Also, many tests that you copied and much functionality of the universal canister are not relevant to test the rust agent (which, I understand, is the purpose here), so you can actually simplify a bit – for the rust agent, you really only need query and update. Or am I missing something?

hansl pushed a commit that referenced this pull request Aug 18, 2020
* tests: add ic-ref tests and universal canister wasm

* add wasm32 target to CI

* remove warnings
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