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

tests: replace the first batch of demo tests with snapd integration tests #1552

Merged
merged 1 commit into from
Sep 28, 2017

Conversation

come-maiz
Copy link
Contributor

@come-maiz come-maiz commented Sep 15, 2017

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on bug reports?
  • If this is a new feature. Have you discussed the design on the forum?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./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.

@come-maiz come-maiz force-pushed the snapd_integration_tests1 branch 5 times, most recently from 99139d6 to 26db99e Compare September 15, 2017 05:52
@come-maiz come-maiz changed the title tests: replace the mosquitto demo test with a snapd integration test tests: replace the first batch of demo tests with snapd integration tests Sep 15, 2017
@sergiusens
Copy link
Collaborator

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),
Copy link
Contributor

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?

@kyrofa
Copy link
Contributor

kyrofa commented Sep 19, 2017

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 integration_tests/snapd/__init__.py rather than diluting the others.

+1 from me.

description: A simple OpenCV example
confinement: strict

build-packages: [gcc, g++, libc6-dev, libopencv-dev]
Copy link
Contributor

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?

@sergiusens
Copy link
Collaborator

Ok @kyrofa point taken.
@ElOpio please just re-add the opencv one for now until you think of a good solution and let's move this forward as a first batch

@come-maiz
Copy link
Contributor Author

Thanks for the catch @kyrofa.
@sergiusens I reverted opencv.

@kyrofa
Copy link
Contributor

kyrofa commented Sep 28, 2017

Land this baby.

@sergiusens sergiusens added this to the 2.35 milestone Sep 28, 2017
@sergiusens sergiusens merged commit efa8927 into canonical:master Sep 28, 2017
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