Skip to content

Commit

Permalink
a2o-migrate: Add Vagrantfile for integration test
Browse files Browse the repository at this point in the history
This uses my work on balenaos + vagrant [1] to create an easily reproduceable
integration test.
We need a kernel that supports aufs and overlayfs as storage drivers.
A balenaOS image generated with this [2] commit works fine.

[1]: https://github.com/balena-io-playground/balenaos-vagrant
[2]: balena-os/meta-balena@528494d

Signed-off-by: Robert Günzler <robertg@balena.io>
  • Loading branch information
robertgzr committed Oct 29, 2019
1 parent ff87523 commit 28969bd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cmd/a2o-migrate/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- mode: ruby -*-
# vi: set ft=ruby sw=2 ts=2

Vagrant.require_version '>= 2.0.0'

ENV["TERM"] = "xterm-256color"
ENV["LC_ALL"] = "en_US.UTF-8"

Vagrant.configure("2") do |config|
config.vm.box = "balena/os"

config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/mnt/data/vagrant",
create: true,
type: "rsync"
# rsync__rsync_path: "rsync"
config.vm.synced_folder "../../contrib/beind", "/mnt/data/beind",
create: true,
type: "rsync"
# rsync__rsync_path: "rsync"

config.vm.provision "shell", name: "beind-container", privileged: false, inline: "balena build -t balena/balena-engine:beind /mnt/data/beind"
config.vm.provision "shell", name: "a2o-bin", privileged: false, inline: "balena run --rm -t -e GOPROXY=https://proxy.golang.org -e VERSION=unsupported -v /mnt/data/vagrant:/go/src -w /go/src golang:1.13-alpine ash -c 'apk add make; CGO_ENABLED=0 make test-unit a2o-migrate'"
config.vm.provision "shell", name: "test", privileged: false, inline: "cd /mnt/data/vagrant; ./test/integration.sh"
end

0 comments on commit 28969bd

Please sign in to comment.