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 with real images #26

Open
pimterry opened this issue Oct 27, 2017 · 1 comment
Open

Test with real images #26

pimterry opened this issue Oct 27, 2017 · 1 comment

Comments

@pimterry
Copy link
Contributor

This is just an idea, opening for discussion @zvin. Right now, for PRs like #25, I need to manually edit the images, creating partitions that simulate real images, but which stay small, because we have to commit them.

We could change this, so that:

  • When you run the test, it downloads some set of real images, if you don't already have them locally
  • When you need to write an image, we generate an empty file, rather than having to have a device.random file that has exactly the same file as every image.

That way the git history would be tiny, we wouldn't have to manually mess around with images, and while the first test run would take a while, all later runs would be pretty quick.

More importantly, imo, this would make our tests totally representative of real usage. Right now, it's hard to be sure device init works on a real image, so I've mostly been testing by linking this module into the CLI. If we were really running them against real images, we'd have actual guarantees.

What do you think?

@zvin
Copy link

zvin commented Oct 30, 2017

That sounds good.
The only problem is that will require Internet access for running tests. resin-device-init tests already require it anyway.
I'll need something similar for testing resin-preload.
We can get the images from the staging image-maker s3 bucket, it requires no credentials.

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

No branches or pull requests

2 participants