aboutsummaryrefslogtreecommitdiff
path: root/travis
diff options
context:
space:
mode:
Diffstat (limited to 'travis')
-rwxr-xr-x[-rw-r--r--]travis/run-gofmt (renamed from travis/gofmtcheck.sh)0
-rwxr-xr-xtravis/run-tests-acceptance (renamed from travis/run_acceptance_test.sh)1
-rwxr-xr-xtravis/run-tests-inside-guest18
-rwxr-xr-xtravis/setup-host1
4 files changed, 13 insertions, 7 deletions
diff --git a/travis/gofmtcheck.sh b/travis/run-gofmt
index d7d7aef6..d7d7aef6 100644..100755
--- a/travis/gofmtcheck.sh
+++ b/travis/run-gofmt
diff --git a/travis/run_acceptance_test.sh b/travis/run-tests-acceptance
index 5010505a..30d49207 100755
--- a/travis/run_acceptance_test.sh
+++ b/travis/run-tests-acceptance
@@ -5,4 +5,5 @@ unset http_proxy
export TERRAFORM_LIBVIRT_TEST_DOMAIN_TYPE=qemu
export LIBVIRT_DEFAULT_URI="qemu:///system"
export TF_ACC=true
+
go test -v -covermode=count -coverprofile=profile.cov -timeout=1200s ./libvirt
diff --git a/travis/run-tests-inside-guest b/travis/run-tests-inside-guest
index a860a4d7..32ff9773 100755
--- a/travis/run-tests-inside-guest
+++ b/travis/run-tests-inside-guest
@@ -1,19 +1,23 @@
#!/bin/bash
set -x
+base="/root/go/src/github.com/dmacvicar"
+
unset http_proxy
-export GOROOT=/usr/lib/go-1.9/
-export GOPATH=/root/go
+export GOROOT="/usr/lib/go-1.9/"
+export GOPATH="/root/go"
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
-mkdir -p /root/go/src/github.com/dmacvicar/
-cp -r /code/ /root/go/src/github.com/dmacvicar/terraform-provider-libvirt
-cd /root/go/src/github.com/dmacvicar/terraform-provider-libvirt
+mkdir -p $base
+cp -r /code/ $base/terraform-provider-libvirt
+cd $base/terraform-provider-libvirt
go build .
-export TERRAFORM_LIBVIRT_TEST_DOMAIN_TYPE=qemu
+export TERRAFORM_LIBVIRT_TEST_DOMAIN_TYPE="qemu"
export LIBVIRT_DEFAULT_URI="qemu:///system"
-export TF_ACC=true
+export TF_ACC="true"
+export TF_SKIP_QEMU_AGENT="true"
+
go test -v -covermode=count -coverprofile=profile.cov -timeout=1200s ./libvirt
diff --git a/travis/setup-host b/travis/setup-host
index cd9ce64c..6bb455cc 100755
--- a/travis/setup-host
+++ b/travis/setup-host
@@ -11,6 +11,7 @@ sudo sed -i 's/LXD_IPV4_NETWORK=".*"/LXD_IPV4_NETWORK="192.168.123.0\/24"/' /etc
sudo sed -i 's/LXD_IPV4_DHCP_RANGE=".*"/LXD_IPV4_DHCP_RANGE="192.168.123.2,192.168.123.12"/' /etc/default/lxd-bridge
sudo sed -i 's/LXD_IPV4_DHCP_MAX=".*"/LXD_IPV4_DHCP_MAX="10"/' /etc/default/lxd-bridge
+sudo service libvirtd restart
sudo service lxd restart
sudo lxc launch ubuntu:zesty libvirt -c security.privileged=true