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

dmacvicar / terraform-provider-libvirt / 314
29%

Build:
DEFAULT BRANCH: master
Ran 14 Mar 2017 02:06PM UTC
Jobs 1
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

pending completion
314

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.

5 of 5 new or added lines in 1 file covered. (100.0%)

1041 of 2276 relevant lines covered (45.74%)

156.64 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
libvirt/domain_def.go
Jobs
ID Job ID Ran Files Coverage
1 314.1 14 Mar 2017 02:06PM UTC 0
45.74
Travis Job 314.1
Source Files on build 314
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #314
  • 72389541 on github
  • Prev Build on master (#313)
  • Next Build on master (#316)
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