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: run the tests in travis using LXD containers #1415

Merged
merged 19 commits into from
Jul 21, 2017

Conversation

come-maiz
Copy link
Contributor

No description provided.

# This is likely needed to wait for systemd in the container to start and get
# an IP, configure DNS. First boot is always a bit slow because cloud-init
# needs to run too.
sleep 10
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to use something like for i in {1..50}; do ping -c1 www.ubuntu.com &> /dev/null && break; done instead of a fixed sleep? That's the approach snapcraft uses to see if the container's ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried removing the sleep and leaving just the ping, but it wasn't enough. apt update still failed.
I'm trying now with this loop plus a 5s sleep.


echo "Set up the main archive."
docker exec -i "$name" sed -i s/archive.ubuntu.com/us.archive.ubuntu.com/g /etc/apt/sources.list
docker exec -i "$name" apt update
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth keeping the docker workflow around to catch docker-related regressions? Maybe run less frequently. Just a thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, I didn't want to remove it yet. That was a mistake. Some of the jobs are still using docker, I'll update them later.
But when we are done migrating to lxc, I plan to remove it.
I think we should add a new suite instead, for testing the docker snapcore/snapcraft container. It would build snaps though, not run unit or integration tests.

@sergiusens sergiusens changed the title tests: run the tests in travis using LXC containers tests: run the tests in travis using LXD containers Jul 21, 2017
@sergiusens sergiusens merged commit 8c9a38c into canonical:master Jul 21, 2017
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Aug 3, 2017
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Sep 21, 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.

None yet

3 participants