Browse Source

[2436] Use example.org instead of root zone

Just to be closer to real life, no special reason.
Michal 'vorner' Vaner 12 years ago
parent
commit
4209615da0

+ 3 - 3
src/lib/datasrc/tests/testdata/checkwarn.zone

@@ -1,4 +1,4 @@
-.			86400	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2010030802 1800 900 604800 86400
-.           86400   IN  NS  ns.
+example.org.			86400	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2010030802 1800 900 604800 86400
+example.org.            86400   IN  NS  ns.example.org.
 ; Missing the address for the nameserver. This should generate a warning, but not error.
-www.       3600    IN   A   192.0.2.1
+www.example.org.        3600    IN  A   192.0.2.1

+ 2 - 2
src/lib/datasrc/tests/testdata/novalidate.zone

@@ -1,3 +1,3 @@
-.			86400	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2010030802 1800 900 604800 86400
+example.org.			86400	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2010030802 1800 900 604800 86400
 ; Missing the NS here, will generate an error in post-load check of the zone.
-www.       3600    IN   A   192.0.2.1
+www.example.org.        3600    IN  A   192.0.2.1

+ 8 - 6
src/lib/datasrc/tests/zone_loader_unittest.cc

@@ -423,7 +423,7 @@ TEST_F(ZoneLoaderTest, loadSyntaxError) {
 
 // Test there's validation of the data in the zone loader.
 TEST_F(ZoneLoaderTest, loadCheck) {
-    ZoneLoader loader(destination_client_, Name::ROOT_NAME(),
+    ZoneLoader loader(destination_client_, Name("example.org"),
                       TEST_DATA_DIR "/novalidate.zone");
     EXPECT_THROW(loader.loadIncremental(10), ZoneContentError);
     // The messages go to the log. We don't have an easy way to examine them.
@@ -432,8 +432,9 @@ TEST_F(ZoneLoaderTest, loadCheck) {
 
 // The same test, but for copying from other data source
 TEST_F(ZoneLoaderTest, copyCheck) {
-    prepareSource(Name::ROOT_NAME(), "novalidate.zone");
-    ZoneLoader loader(destination_client_, Name::ROOT_NAME(), source_client_);
+    prepareSource(Name("example.org"), "novalidate.zone");
+    ZoneLoader loader(destination_client_, Name("example.org"),
+                      source_client_);
 
     EXPECT_THROW(loader.loadIncremental(10), ZoneContentError);
     // The messages go to the log. We don't have an easy way to examine them.
@@ -442,7 +443,7 @@ TEST_F(ZoneLoaderTest, copyCheck) {
 
 // Check a warning doesn't disrupt the loading of the zone
 TEST_F(ZoneLoaderTest, loadCheckWarn) {
-    ZoneLoader loader(destination_client_, Name::ROOT_NAME(),
+    ZoneLoader loader(destination_client_, Name("example.org"),
                       TEST_DATA_DIR "/checkwarn.zone");
     EXPECT_TRUE(loader.loadIncremental(10));
     // The messages go to the log. We don't have an easy way to examine them.
@@ -452,8 +453,9 @@ TEST_F(ZoneLoaderTest, loadCheckWarn) {
 }
 
 TEST_F(ZoneLoaderTest, copyCheckWarn) {
-    prepareSource(Name::ROOT_NAME(), "checkwarn.zone");
-    ZoneLoader loader(destination_client_, Name::ROOT_NAME(), source_client_);
+    prepareSource(Name("example.org"), "checkwarn.zone");
+    ZoneLoader loader(destination_client_, Name("example.org"),
+                      source_client_);
     EXPECT_TRUE(loader.loadIncremental(10));
     // The messages go to the log. We don't have an easy way to examine them.
     // But the zone was committed and contains all 3 RRs