@@ -153,6 +153,11 @@ impl DnsZone {
153
153
/// assert!(!dns_zone.ns_records.is_empty());
154
154
/// assert!(!dns_zone.resource_records.is_empty());
155
155
/// ```
156
+ /// Disclaimer!!
157
+ /// The SOA must be all in only one line
158
+ /// Example:
159
+ /// EDU. IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. ( 870729 1800 300 604800 86400 )
160
+ /// . IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. ( 870611 1800 300 604800 86400 )
156
161
pub fn from_master_file ( file_path : & str ) -> io:: Result < Self > { // Result<Self, io::Error> is the same as io::Result<Self>
157
162
// Open the file
158
163
let path = Path :: new ( file_path) ;
@@ -460,6 +465,13 @@ mod dns_zone_tests {
460
465
assert_eq ! ( dns_zone. get_resource_records( ) [ 0 ] . get_rdata( ) , Rdata :: TXT ( TxtRdata :: new( vec![ String :: from( "dcc" ) ] ) ) ) ;
461
466
}
462
467
468
+
469
+ /// Disclaimer!!
470
+ /// The SOA must be all in only one line
471
+ /// The file used in the next text does not have the SOA in one line
472
+ /// Change the file to test the function
473
+ /// New SOA:
474
+ /// EDU. IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. ( 870729 1800 300 604800 86400 )
463
475
#[ test]
464
476
fn test_from_master_file_edu ( ) {
465
477
// Master file for the EDU domain.
@@ -493,6 +505,13 @@ mod dns_zone_tests {
493
505
//assert!(dns_zone.get_resource_records().iter().any(|rr| rr.get_name().get_name() == "YALE.EDU." && matches!(rr.get_rdata(), Rdata::NS(_))));
494
506
}
495
507
508
+
509
+ /// Disclaimer!!
510
+ /// The SOA must be all in only one line
511
+ /// The file used in the next text does not have the SOA in one line
512
+ /// Change the file to test the function
513
+ /// New SOA:
514
+ /// . IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. ( 870611 1800 300 604800 86400 )
496
515
#[ test]
497
516
fn test_from_master_file_root ( ) {
498
517
// Master file for the root zone.
0 commit comments