• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dmacvicar / terraform-provider-libvirt / 314 / 1
29%
master: 29%

Build:
DEFAULT BRANCH: master
Ran 14 Mar 2017 02:06PM UTC
Files 19
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Mar 2017 01:58PM UTC coverage: 45.738% (+19.2%) from 26.529%
314.1

push

travis-ci

inercia
Increase code coverage by running TF acceptance tests

This has required a number of changes, first of all to .travis.yml
to allow the TF acceptance tests to run:
   1. To avoid the need to build libvirt, we've added the Ubuntu
      "cloud-archive:mitaka" repo which contains more recent versions
      of libvirt than those that ship with 14.04.  This also cuts
      a couple of minutes off the travis run-time.
   2. We need to define and start a default storage pool, since one
      doesn't exist by default on 14.04.
   3. We need to add the travis user to the libvirtd group, and
      then run both tests with "sg" to set the libvirtd group without
      requiring a log-out/log-in
   4. We need to set a couple of global environment variables for
      the travis run:
      - TF_ACC to true to ensure that TF acceptance tests are run
      - LIBVIRT_DEFAULT_URI needs to be set, we set it to qemu://system.
      - We've added a new environment variable that can be used to
        set the domain type for test purposes.  We need to set the
        domain type to "qemu" for travis CI.  "test" doesn't implement
        all of the libvirt functions that are used, and "kvm" isn't
        yet available in travis.
   5. We have to add "-v" to the test and goveralls command to ensure
      that TF acceptance tests are run.

In addition, we had to make the following change to
resource_libvirt_domain_test.go
   - The "br0" bridge doesn't exist by default, so instead we use
     the default network in resource_libvirt_domain_test.go

With these changes the test coverage goes up to 44% as measured by
goveralls.  Because we're using qemu emulation, the tests take about
2 mins to run on travis.

We might not need to run both the tests and goveralls; one might do.

1041 of 2276 relevant lines covered (45.74%)

156.64 hits per line

Source Files on job 314.1
  • Tree
  • List 0
  • Changed 12
  • Source Changed 1
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 314
  • Travis Job 314.1
  • 72389541 on github
  • Prev Job for on master (#313.1)
  • Next Job for on master (#316.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc