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

firmware/tests: test against bitbox02 simulator #97

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

benma
Copy link
Contributor

@benma benma commented Jun 3, 2024

No description provided.

benma added 3 commits July 3, 2024 12:13
So we can use sync.OnceValues
The simulators are downloaded base on the simulators.json file if the
file does not exist (or the hash is wrong).

This allows us to exercise the library much more easily without
needing to mock everything, as the simulator behaves like the real
BitBox02 for the most part.

We could automatically download all releases by using the GitHub
releases
API (https://api.github.com/repos/BitBoxSwiss/bitbox02-firmware/releases),
but the downside is that there would be network requests each time you
run the unit tests. For now we simply keep the list manually.

The simulators are only released for linux-amd64 for now, so we skip
tests if we are not running in this environment.
v3 being deprecated.
Copy link
Collaborator

@Beerosagos Beerosagos left a comment

Choose a reason for hiding this comment

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

LGTM

@benma benma merged commit d604361 into BitBoxSwiss:master Jul 8, 2024
3 checks passed
@benma benma deleted the sim branch July 8, 2024 16:30
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.

2 participants