Explorar el Código

gocheck has moved from launchpad to github

(yay)
Ask Bjørn Hansen hace 11 años
padre
commit
99f9bd899a
Se han modificado 7 ficheros con 19 adiciones y 17 borrados
  1. 1 1
      .travis.yml
  2. 1 1
      monitor_test.go
  3. 8 7
      serve_test.go
  4. 1 1
      targeting_test.go
  5. 1 1
      zone_stats_test.go
  6. 4 4
      zone_test.go
  7. 3 2
      zones_test.go

+ 1 - 1
.travis.yml

@@ -11,7 +11,7 @@ install:
   - curl -s http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz | gzip -cd > $TRAVIS_BUILD_DIR/db/GeoIPASNum.dat
   - go get github.com/abh/dns
   - go get github.com/abh/geoip
-  - go get launchpad.net/gocheck
+  - go get gopkg.in/check.v1
   - go get -v
   - go build -v
   - go install

+ 1 - 1
monitor_test.go

@@ -3,10 +3,10 @@ package main
 import (
 	"fmt"
 	"io/ioutil"
-	. "launchpad.net/gocheck"
 	"net/http"
 	"strings"
 	"time"
+	. "gopkg.in/check.v1"
 )
 
 type MonitorSuite struct {

+ 8 - 7
serve_test.go

@@ -1,11 +1,12 @@
 package main
 
 import (
-	"github.com/abh/dns"
-	. "launchpad.net/gocheck"
 	"net"
 	"strings"
 	"time"
+
+	"github.com/abh/dns"
+	. "gopkg.in/check.v1"
 )
 
 const (
@@ -91,12 +92,12 @@ func (s *ServeSuite) TestServing(c *C) {
 	c.Check(r.Answer[1].(*dns.MX).Mx, Equals, "mx2.example.net.")
 	c.Check(r.Answer[1].(*dns.MX).Preference, Equals, uint16(20))
 
-        // Verify the first A record was created
+	// Verify the first A record was created
 	r = exchange(c, "a.b.c.test.example.com.", dns.TypeA)
 	ip = r.Answer[0].(*dns.A).A
 	c.Check(ip.String(), Equals, "192.168.1.7")
 
-        // Verify sub-labels are created
+	// Verify sub-labels are created
 	r = exchange(c, "b.c.test.example.com.", dns.TypeA)
 	c.Check(r.Answer, HasLen, 0)
 	c.Check(r.Rcode, Equals, dns.RcodeSuccess)
@@ -105,17 +106,17 @@ func (s *ServeSuite) TestServing(c *C) {
 	c.Check(r.Answer, HasLen, 0)
 	c.Check(r.Rcode, Equals, dns.RcodeSuccess)
 
-        // Verify the first A record was created
+	// Verify the first A record was created
 	r = exchange(c, "three.two.one.test.example.com.", dns.TypeA)
 	ip = r.Answer[0].(*dns.A).A
 	c.Check(ip.String(), Equals, "192.168.1.5")
 
-        // Verify single sub-labels is created and no record is returned
+	// Verify single sub-labels is created and no record is returned
 	r = exchange(c, "two.one.test.example.com.", dns.TypeA)
 	c.Check(r.Answer, HasLen, 0)
 	c.Check(r.Rcode, Equals, dns.RcodeSuccess)
 
-        // Verify the A record wasn't over written
+	// Verify the A record wasn't over written
 	r = exchange(c, "one.test.example.com.", dns.TypeA)
 	ip = r.Answer[0].(*dns.A).A
 	c.Check(ip.String(), Equals, "192.168.1.6")

+ 1 - 1
targeting_test.go

@@ -2,7 +2,7 @@ package main
 
 import (
 	"net"
-	. "launchpad.net/gocheck"
+	. "gopkg.in/check.v1"
 )
 
 type TargetingSuite struct {

+ 1 - 1
zone_stats_test.go

@@ -1,7 +1,7 @@
 package main
 
 import (
-	. "launchpad.net/gocheck"
+	. "gopkg.in/check.v1"
 )
 
 type ZoneStatsSuite struct {

+ 4 - 4
zone_test.go

@@ -2,7 +2,7 @@ package main
 
 import (
 	"github.com/abh/dns"
-	. "launchpad.net/gocheck"
+	. "gopkg.in/check.v1"
 )
 
 func (s *ConfigSuite) TestExampleComZone(c *C) {
@@ -61,7 +61,7 @@ func (s *ConfigSuite) TestExampleComZone(c *C) {
 	c.Check(Txt[0].RR.(*dns.TXT).Txt[0], Equals, "w1000")
 	c.Check(Txt[1].RR.(*dns.TXT).Txt[0], Equals, "w1")
 
-        //verify empty labels are created
+	//verify empty labels are created
 	label, qtype = ex.findLabels("a.b.c", []string{"@"}, qTypes{dns.TypeA})
 	c.Check(label.Records[dns.TypeA], HasLen, 1)
 	c.Check(label.Records[dns.TypeA][0].RR.(*dns.A).A.String(), Equals, "192.168.1.7")
@@ -74,7 +74,7 @@ func (s *ConfigSuite) TestExampleComZone(c *C) {
 	c.Check(label.Records[dns.TypeA], HasLen, 0)
 	c.Check(label.Label, Equals, "c")
 
-        //verify label is created
+	//verify label is created
 	label, qtype = ex.findLabels("three.two.one", []string{"@"}, qTypes{dns.TypeA})
 	c.Check(label.Records[dns.TypeA], HasLen, 1)
 	c.Check(label.Records[dns.TypeA][0].RR.(*dns.A).A.String(), Equals, "192.168.1.5")
@@ -83,7 +83,7 @@ func (s *ConfigSuite) TestExampleComZone(c *C) {
 	c.Check(label.Records[dns.TypeA], HasLen, 0)
 	c.Check(label.Label, Equals, "two.one")
 
-        //verify label isn't overwritten
+	//verify label isn't overwritten
 	label, qtype = ex.findLabels("one", []string{"@"}, qTypes{dns.TypeA})
 	c.Check(label.Records[dns.TypeA], HasLen, 1)
 	c.Check(label.Records[dns.TypeA][0].RR.(*dns.A).A.String(), Equals, "192.168.1.6")

+ 3 - 2
zones_test.go

@@ -1,12 +1,13 @@
 package main
 
 import (
-	"github.com/abh/dns"
 	"io"
 	"io/ioutil"
-	. "launchpad.net/gocheck"
 	"os"
 	"testing"
+
+	"github.com/abh/dns"
+	. "gopkg.in/check.v1"
 )
 
 // Hook up gocheck into the gotest runner.