Add integration test that starts blender example in goth#281
Add integration test that starts blender example in goth#281
Conversation
e1cd13f to
475ab70
Compare
tests/goth/assets/goth-config.yml
Outdated
| @@ -0,0 +1,62 @@ | |||
| # Note: values of keys denoting paths are resolved relative to the directory | |||
| # in which this file is located. | |||
| # The tokens `~` and `~user` are also replaced by the corresponding users's | |||
There was a problem hiding this comment.
| # The tokens `~` and `~user` are also replaced by the corresponding users's | |
| # The tokens `~` and `~user` are also replaced by user's |
There was a problem hiding this comment.
This file is now (as of f16cc5a) generated by goth in a separate workflow step.
556cb07 to
c03d5bb
Compare
3efba97 to
22a121b
Compare
0257794 to
3a222c0
Compare
kmazurek
left a comment
There was a problem hiding this comment.
Looks good, left some minor comments. I am somewhat worried about the maintainability of goth assets, but that's a separate discussion.
| # - <your-branch> # put your branch name here to test it @ GH Actions | ||
| pull_request: | ||
| branches: | ||
| - master |
There was a problem hiding this comment.
The workflow tests.yml includes release branches (i.e. - b0.*) on pushes and pull requests. Perhaps they should be added here too?
| - "8545:8545" | ||
|
|
||
| zksync: | ||
| image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:7a25ed913d4a |
There was a problem hiding this comment.
| image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:7a25ed913d4a | |
| image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:f6d0cf02f6bc |
I just realised updating these image hashes is going to be troublesome once tests are split out into project repos. :x
tests/goth/assets/goth-config.yml
Outdated
| class: "goth.runner.probe.RequestorProbe" | ||
|
|
||
| - name: "VM-Wasm-Provider" | ||
| class: "goth.runner.provider.ProviderProbeWithLogSteps" |
There was a problem hiding this comment.
| class: "goth.runner.provider.ProviderProbeWithLogSteps" | |
| class: "goth.runner.provider.ProviderProbe" |
Once golemfactory/goth#454 is merged. I'm getting more and more skeptical about having these assets duplicated across repos. :(
There was a problem hiding this comment.
Good point, I've removed the asset files from the repository and instead added a command that creates them every time the tests are run -- see f16cc5a
| # - <your-branch> # put your branch name here to test it @ GH Actions | ||
| pull_request: | ||
| branches: | ||
| - master |
There was a problem hiding this comment.
"On pull request" action for yajsapi unit tests looks like this:
| - master | |
| - master | |
| - b0.* |
| srvresolver = "^0.3.5" | ||
| colorama = "^0.4.4" | ||
|
|
||
| goth = {git = "https://github.com/golemfactory/goth.git", branch = "master", optional = true, python = "^3.8.0"} |
There was a problem hiding this comment.
I think that there should be a comment explaining why goth was added as an optional dependency, not a dev dependency.
I couldn't make it work with goth as dev-dependency, as goth requires Python >= 3.8, which conflicts with Python >= 3.6 for the whole project. So goth is now installed with optional = "true" and python = "^3.8.0".
Perhaps it can be moved to dev-dependencies (it would be an optional dev-dependency then, I'm not sure if that would work though).
| poetry install -E integration-tests | ||
|
|
||
| - name: Log in to GitHub Docker repository | ||
| run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${{github.actor}} --password-stdin |
There was a problem hiding this comment.
do we still need this log-in given that goth repo is now public?
There was a problem hiding this comment.
We still need this for two reasons:
- Pointing the Docker daemon to GitHub's package registry (by default it only uses hub.docker.com).
- Basic authentication, I believe this is similar to using GitHub's REST API, i.e. you still need to provide a personal token even when accessing public endpoints, presumably to handle stuff like rate limiting.
| [build-system] | ||
| requires = ["poetry"] | ||
| build-backend = "poetry.masonry.api" | ||
| requires = ["poetry_core>=1.0.0"] |
There was a problem hiding this comment.
@azawlocki just out of curiosity - where do thse changes come from?
There was a problem hiding this comment.
From the remarks in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517 (I was reading that file looking for a way to add goth as an extra/optional dependency).
| [tool.poetry.extras] | ||
| cli = ['fire', 'rich'] | ||
|
|
||
| integration-tests = ['goth', 'pytest', 'pytest-asyncio'] |
Co-authored-by: filipgolem <44880692+filipgolem@users.noreply.github.com> Co-authored-by: Kuba Mazurek <jakub.mazurek@golem.network>
ca8531d to
dbe0f95
Compare

This PR adds a test case that runs our default blender example (
examples/blender/blender.py) in a 2-provider test network started bygoth.The test serves mainly as a sanity check and an illustrative example of how to create more test cases using
goth.To run the test case on your local machine, do this in the root directory of the
yapapiproject:Few basic properties are checked by monitoring output of the requestor script:
ERROR