Browse Source

Minor tweaks to make tests more robust

Ask Bjørn Hansen 12 years ago
parent
commit
efafaef780
2 changed files with 9 additions and 2 deletions
  1. 4 0
      zone_test.go
  2. 5 2
      zones_test.go

+ 4 - 0
zone_test.go

@@ -7,6 +7,10 @@ import (
 
 func (s *ConfigSuite) TestZone(c *C) {
 	ex := s.zones["test.example.com"]
+
+	// test.example.com was loaded
+	c.Assert(ex.Labels, NotNil)
+
 	c.Check(ex.Labels["weight"].MaxHosts, Equals, 1)
 
 	// Make sure that the empty "no.bar" zone gets skipped and "bar" is used

+ 5 - 2
zones_test.go

@@ -28,13 +28,16 @@ func (s *ConfigSuite) TestReadConfigs(c *C) {
 	c.Check(s.zones["example.com"].Origin, Equals, "example.com")
 	c.Check(s.zones["test.example.org"].Origin, Equals, "test.example.org")
 
-	tz := s.zones["test.example.com"]
-
 	// The real tests are in test.example.com so we have a place
 	// to make nutty configuration entries
+	tz := s.zones["test.example.com"]
+
+	// test.example.com was loaded
 	c.Check(tz.Origin, Equals, "test.example.com")
+
 	c.Check(tz.Options.MaxHosts, Equals, 2)
 	c.Check(tz.Options.Contact, Equals, "support.bitnames.com")
+
 	c.Check(tz.Labels["weight"].MaxHosts, Equals, 1)
 
 	/* test different cname targets */