Skip to content

Commit

Permalink
Adapted test cases the all the previous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kobliha committed Dec 9, 2014
1 parent a14d622 commit f85bdf3
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
18 changes: 9 additions & 9 deletions testsuite/tests/Read.out
Expand Up @@ -4,21 +4,21 @@ Execute .target.bash_output "stat --format='rights: %a, blocks: %b, size: %s, ow
Read .sysconfig.named.NAMED_RUN_CHROOTED 0
Read .sysconfig.network.config.NETCONFIG_DNS_POLICY "STATIC"
Read .sysconfig.network.config.NETCONFIG_DNS_FORWARDER 0
Dir .dns.named.section: ["options", "zone \"localhost\" in"]
Dir .dns.named.section: ["options", "zone \"example.org\" in"]
Dir .dns.named.value.options: ["directory", "notify"]
Read .dns.named.value.options.directory ["\"/var/lib/named\""]
Read .dns.named.value.options.notify ["no"]
Read .sysconfig.network.config.NETCONFIG_DNS_STATIC_SERVERS ""
Dir .dns.named.section: ["options", "zone \"localhost\" in"]
Dir .dns.named.section: ["options", "zone \"example.org\" in"]
Read .dns.named.value.acl []
Read .sysconfig.named.NAMED_CONF_INCLUDE_FILES 0
Read .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[]
Read .dns.named.value."zone \"localhost\" in".type ["master"]
Read .dns.named.value."zone \"localhost\" in".file ["\"localhost.zone\""]
Read .dns.zone "/var/lib/named/localhost.zone" $["TTL":"1W", "records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", "value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":42, "server":"@", "zone":"@"]]
Dir .dns.named.value."zone \"localhost\" in": ["file", "type"]
Read .dns.named.value."zone \"localhost\" in"."file" ["\"localhost.zone\""]
Read .dns.named.value."zone \"localhost\" in"."type" ["master"]
Read .dns.named.value."zone \"example.org\" in".type ["master"]
Read .dns.named.value."zone \"example.org\" in".file ["\"master/example.org\""]
Read .dns.zone "/var/lib/named/master/example.org" $["TTL":"1W", "records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", "value":"10.0.0.1"], $["key":"server_name", "type":"A", "value":"10.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":42, "server":"@", "zone":"@"]]
Dir .dns.named.value."zone \"example.org\" in": ["file", "type"]
Read .dns.named.value."zone \"example.org\" in"."file" ["\"master/example.org\""]
Read .dns.named.value."zone \"example.org\" in"."type" ["master"]
Return true
Dump =======================
Return $["allowed_interfaces":[], "chroot":"1", "logging":[], "options":[$["key":"directory", "value":"\"/var/lib/named\""], $["key":"notify", "value":"no"], $["key":"forwarders", "value":""]], "start_service":"0", "use_ldap":"0", "zones":[$["file":"localhost.zone", "options":[$["key":"file", "value":"\"localhost.zone\""], $["key":"type", "value":"master"]], "records":[$["key":"localhost.", "type":"NS", "value":"@"], $["key":"localhost.", "type":"A", "value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", "zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", "type":"master", "zone":"localhost"]]]
Return $["allowed_interfaces":[], "chroot":"1", "logging":[], "options":[$["key":"directory", "value":"\"/var/lib/named\""], $["key":"notify", "value":"no"], $["key":"forwarders", "value":""]], "start_service":"0", "use_ldap":"0", "zones":[$["file":"master/example.org", "options":[$["key":"file", "value":"\"master/example.org\""], $["key":"type", "value":"master"]], "records":[$["key":"example.org.", "type":"NS", "value":"@"], $["key":"example.org.", "type":"A", "value":"10.0.0.1"], $["key":"server_name", "type":"A", "value":"10.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", "zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", "type":"master", "zone":"example.org"]]]
10 changes: 5 additions & 5 deletions testsuite/tests/Read.rb
Expand Up @@ -178,15 +178,15 @@ def main
},
"dns" => {
"named" => {
"section" => { "options" => "", "zone \"localhost\" in" => "" },
"section" => { "options" => "", "zone \"example.org\" in" => "" },
"value" => {
"options" => {
"directory" => ["\"/var/lib/named\""],
"notify" => ["no"]
},
"zone \"localhost\" in" => {
"zone \"example.org\" in" => {
"type" => ["master"],
"file" => ["\"localhost.zone\""]
"file" => ["\"master/example.org\""]
},
"acl" => []
}
Expand All @@ -195,8 +195,8 @@ def main
"TTL" => "1W",
"records" => [
{ "key" => "", "type" => "NS", "value" => "@" },
{ "key" => "", "type" => "A", "value" => "127.0.0.1" },
{ "key" => "localhost2", "type" => "A", "value" => "127.0.0.2" }
{ "key" => "", "type" => "A", "value" => "10.0.0.1" },
{ "key" => "server_name", "type" => "A", "value" => "10.0.0.2" }
],
"soa" => {
"expiry" => "6W",
Expand Down
9 changes: 5 additions & 4 deletions testsuite/tests/Write.out
Expand Up @@ -22,19 +22,20 @@ Write .sysconfig.named.NAMED_CONF_INCLUDE_FILES "" true
Read .sysconfig.named.NAMED_INITIALIZE_SCRIPTS 0
Write .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "createNamedConfInclude" true
Write .sysconfig.named nil true
Write .dns.named nil true
Write .sysconfig.named.NAMED_RUN_CHROOTED "yes" true
Write .sysconfig.named nil true
Write .sysconfig.network.config.NETCONFIG_DNS_POLICY "0" true
Write .sysconfig.network.config.NETCONFIG_DNS_POLICY "" true
Read .sysconfig.named.NAMED_INITIALIZE_SCRIPTS 0
Write .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "" true
Write .sysconfig.named nil true
Read .target.size "/var/lib/named/master/example.com" 0
Write .dns.named.value."zone \"example.com\" in".type ["master"] true
Dir .dns.named.value."zone \"example.com\" in": []
Execute .target.bash_output "/bin/hostname --fqdn" $["exit":0, "stderr":"", "stdout":"20030806"]
Write .dns.zone ["/var/lib/named/example.com", $["TTL":"1W", "records":[$["key":"localhost", "type":"A", "value":"127.0.0.1"], $["key":"localhost", "type":"NS", "value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", "zone":"@"]]] true
Write .dns.named.value."zone \"example.com\" in".file ["\"example.com\""] true
Write .dns.zone ["/var/lib/named/master/example.com", $["TTL":"1W", "records":[$["key":"localhost", "type":"A", "value":"127.0.0.1"], $["key":"localhost", "type":"NS", "value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", "zone":"@"]]] true
Write .dns.named.value."zone \"example.com\" in".file ["\"master/example.com\""] true
Write .dns.named.value."zone \"example.com\" in".type ["master"] true
Write .dns.named nil true
Write .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "bind" true
Write .sysconfig.network.config nil true
Execute .target.bash_output "/sbin/netconfig update -m dns" $["exit":0, "stderr":"", "stdout":"20030806"]
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/Write.rb
Expand Up @@ -278,7 +278,7 @@ def main
"start_service" => false,
"zones" => [
{
"file" => "example.com",
"file" => "master/example.com",
"records" => [
{
"key" => "localhost",
Expand Down
18 changes: 9 additions & 9 deletions testsuite/tests/YaPIReadZones.out
Expand Up @@ -4,20 +4,20 @@ Execute .target.bash_output "stat --format='rights: %a, blocks: %b, size: %s, ow
Read .sysconfig.named.NAMED_RUN_CHROOTED nil
Read .sysconfig.network.config.NETCONFIG_DNS_POLICY "auto"
Read .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "resolver"
Dir .dns.named.section: ["options", "zone \"localhost\" in"]
Dir .dns.named.section: ["options", "zone \"example.org\" in"]
Dir .dns.named.value.options: ["directory", "notify"]
Read .dns.named.value.options.directory ["\"/var/lib/named\""]
Read .dns.named.value.options.notify ["no"]
Read .sysconfig.network.config.NETCONFIG_DNS_STATIC_SERVERS ""
Dir .dns.named.section: ["options", "zone \"localhost\" in"]
Dir .dns.named.section: ["options", "zone \"example.org\" in"]
Read .dns.named.value.acl []
Read .sysconfig.named.NAMED_CONF_INCLUDE_FILES nil
Read .target.ycp "/var/lib/YaST2/yast2-dns-server_reverse-zones" $[]
Read .dns.named.value."zone \"localhost\" in".type ["master"]
Read .dns.named.value."zone \"localhost\" in".file ["\"localhost.zone\""]
Read .dns.zone "/var/lib/named/localhost.zone" $["TTL":"1W", "records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", "value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":42, "server":"@", "zone":"@"]]
Dir .dns.named.value."zone \"localhost\" in": ["file", "type"]
Read .dns.named.value."zone \"localhost\" in"."file" ["\"localhost.zone\""]
Read .dns.named.value."zone \"localhost\" in"."type" ["master"]
Return [$["file":"localhost.zone", "options":[$["key":"file", "value":"\"localhost.zone\""], $["key":"type", "value":"master"]], "records":[$["key":"localhost.", "type":"NS", "value":"@"], $["key":"localhost.", "type":"A", "value":"127.0.0.1"], $["key":"localhost2", "type":"A", "value":"127.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", "zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", "type":"master", "zone":"localhost"]]
Read .dns.named.value."zone \"example.org\" in".type ["master"]
Read .dns.named.value."zone \"example.org\" in".file ["\"/master/example.org\""]
Read .dns.zone "/var/lib/named//master/example.org" $["TTL":"1W", "records":[$["key":"", "type":"NS", "value":"@"], $["key":"", "type":"A", "value":"10.0.0.1"], $["key":"server2", "type":"A", "value":"10.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":42, "server":"@", "zone":"@"]]
Dir .dns.named.value."zone \"example.org\" in": ["file", "type"]
Read .dns.named.value."zone \"example.org\" in"."file" ["\"/master/example.org\""]
Read .dns.named.value."zone \"example.org\" in"."type" ["master"]
Return [$["file":"/master/example.org", "options":[$["key":"file", "value":"\"/master/example.org\""], $["key":"type", "value":"master"]], "records":[$["key":"example.org.", "type":"NS", "value":"@"], $["key":"example.org.", "type":"A", "value":"10.0.0.1"], $["key":"server2", "type":"A", "value":"10.0.0.2"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"42", "server":"@", "zone":"@"], "this_zone_had_NS_record_at_start":"1", "ttl":"1W", "type":"master", "zone":"example.org"]]
Dump ==========================================================
10 changes: 5 additions & 5 deletions testsuite/tests/YaPIReadZones.rb
Expand Up @@ -166,15 +166,15 @@ def main
},
"dns" => {
"named" => {
"section" => { "options" => "", "zone \"localhost\" in" => "" },
"section" => { "options" => "", "zone \"example.org\" in" => "" },
"value" => {
"options" => {
"directory" => ["\"/var/lib/named\""],
"notify" => ["no"]
},
"zone \"localhost\" in" => {
"zone \"example.org\" in" => {
"type" => ["master"],
"file" => ["\"localhost.zone\""]
"file" => ["\"/master/example.org\""]
},
"acl" => []
}
Expand All @@ -183,8 +183,8 @@ def main
"TTL" => "1W",
"records" => [
{ "key" => "", "type" => "NS", "value" => "@" },
{ "key" => "", "type" => "A", "value" => "127.0.0.1" },
{ "key" => "localhost2", "type" => "A", "value" => "127.0.0.2" }
{ "key" => "", "type" => "A", "value" => "10.0.0.1" },
{ "key" => "server2", "type" => "A", "value" => "10.0.0.2" }
],
"soa" => {
"expiry" => "6W",
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/YaPIWriteGlobalOptions.out
Expand Up @@ -40,13 +40,13 @@ Write .sysconfig.named.NAMED_CONF_INCLUDE_FILES "" true
Read .sysconfig.named.NAMED_INITIALIZE_SCRIPTS nil
Write .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "createNamedConfInclude" true
Write .sysconfig.named nil true
Write .dns.named nil true
Write .sysconfig.named.NAMED_RUN_CHROOTED "yes" true
Write .sysconfig.named nil true
Write .sysconfig.network.config.NETCONFIG_DNS_POLICY "auto" true
Read .sysconfig.named.NAMED_INITIALIZE_SCRIPTS nil
Write .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "" true
Write .sysconfig.named nil true
Write .dns.named nil true
Write .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "bind" true
Write .sysconfig.network.config nil true
Execute .target.bash_output "/sbin/netconfig update -m dns" $["exit":1, "stderr":"", "stdout":""]
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/YaPIWriteZones.out
Expand Up @@ -38,7 +38,6 @@ Write .sysconfig.named.NAMED_CONF_INCLUDE_FILES "" true
Read .sysconfig.named.NAMED_INITIALIZE_SCRIPTS nil
Write .sysconfig.named.NAMED_INITIALIZE_SCRIPTS "createNamedConfInclude" true
Write .sysconfig.named nil true
Write .dns.named nil true
Write .sysconfig.named.NAMED_RUN_CHROOTED "yes" true
Write .sysconfig.named nil true
Write .sysconfig.network.config.NETCONFIG_DNS_POLICY "STATIC" true
Expand All @@ -53,6 +52,7 @@ Execute .target.bash_output "/bin/hostname --fqdn" $["exit":1, "stderr":"", "std
Write .dns.zone ["/var/lib/named/example.com", $["TTL":"1W", "records":[$["key":"host", "type":"A", "value":"127.0.0.1"], $["key":"example.com.", "type":"NS", "value":"@"]], "soa":$["expiry":"6W", "mail":"root", "minimum":"1W", "refresh":"2D", "retry":"4H", "serial":"2004012701", "server":"@", "zone":"@"]]] true
Write .dns.named.value."zone \"example.com\" in".file ["\"example.com\""] true
Write .dns.named.value."zone \"example.com\" in".type ["master"] true
Write .dns.named nil true
Write .sysconfig.network.config.NETCONFIG_DNS_FORWARDER "bind" true
Write .sysconfig.network.config nil true
Execute .target.bash_output "/sbin/netconfig update -m dns" $["exit":1, "stderr":"", "stdout":""]
Expand Down

0 comments on commit f85bdf3

Please sign in to comment.