-
Notifications
You must be signed in to change notification settings - Fork 440
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
tests: replace the first batch of demo tests with snapd integration tests #1552
tests: replace the first batch of demo tests with snapd integration tests #1552
Conversation
99139d6
to
26db99e
Compare
26db99e
to
59ec03a
Compare
Ok, I did my first round, the thing that irks me a bit is that I would of thought the integration tests that matter would get an extra installation assertion instead of creating a completely new suite. Others, please weigh in |
self.install_snap() | ||
self.assertThat( | ||
subprocess.check_output( | ||
['autotools-hello'], universal_newlines=True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So universal_newlines
means you don't need to decode the output?
I actually like splitting this out into a new suite. These will typically take a bit longer to run, and it gives a well-defined place to put new tests that also happen to get installed. It makes it easy to copy a template instead of "I need this snap to be installed... let me find one that IS installed so I can copy it. No, not that one..." It also allows us to add install-specific helpers to +1 from me. |
demos/opencv/snap/snapcraft.yaml
Outdated
description: A simple OpenCV example | ||
confinement: strict | ||
|
||
build-packages: [gcc, g++, libc6-dev, libopencv-dev] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a good demo to ensure that library crawling continued working correctly. Does one of the "hello" snaps cover that case?
59ec03a
to
9ebc945
Compare
Thanks for the catch @kyrofa. |
9ebc945
to
0c0f753
Compare
Land this baby. |
./runtests.sh static
?./runtests.sh unit
?The mosquitto demo is not showing anything interesting, and it's test is not going to catch any bugs.
Instead of that, I have added a new suite of tests for the integration with snapd, that will execute a python hello world, showing that a python snap built with snapcraft can be executed.
The same with the others. I replaced them with installing and running a hello world.
To this new suite now we can add more interesting things like hooks, and config. With the added benefit that it will run on travis, so we will catch bugs earlier.