-
Notifications
You must be signed in to change notification settings - Fork 441
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
tests: run the tests in travis using LXD containers #1415
Conversation
tools/travis/run_lxc_container.sh
Outdated
# 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 |
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.
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.
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.
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.
tools/travis/run_docker_container.sh
Outdated
|
||
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 |
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.
Would it be worth keeping the docker workflow around to catch docker-related regressions? Maybe run less frequently. Just a thought.
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.
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.
bae311c
to
b3f1501
Compare
No description provided.