blob: cd78f440e116207be956b59045da9333761c664a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
dist: trusty
language: go
go:
- 1.8
before_install:
- sudo add-apt-repository -y cloud-archive:mitaka
- sudo apt-get -qq update
- sudo apt-get install -y qemu libvirt-bin libvirt-dev
- sudo usermod -a -G libvirtd $USER
- echo -e "<pool type='dir'>\n<name>default</name>\n<target>\n<path>/pool-default</path>\n</target>\n</pool>" > pool.xml
- sudo mkdir /pool-default
- sudo chmod a+rwx /pool-default
- sudo virsh pool-define pool.xml
- sudo virsh pool-start default
- go get github.com/mattn/goveralls
install:
- go build .
# override the custom test script, this would trigger
# also the execution of the unit tests of the vendored
# code
env:
global:
- TERRAFORM_LIBVIRT_TEST_DOMAIN_TYPE=qemu
- TF_ACC=true
- LIBVIRT_DEFAULT_URI="qemu:///system"
script:
- sg libvirtd -c "go test -v ./libvirt"
- sg libvirtd -c "$HOME/gopath/bin/goveralls -v -service=travis-ci"
|