Re: [Freeipa-devel] [PATCH] 0001-2 ipatests: SOA record Maintenance tests

2015-04-02 Thread Jan Cholasta

Dne 27.3.2015 v 16:54 Martin Basti napsal(a):

On 27/03/15 16:34, Aleš Mareček wrote:

Greetings!
Martin, thanks for your review and comments!
I changed the name of the patch and setup my git variables properly. I
also re-tested it and got all passed. I'm sending a new patch that is
attached.

- Original Message -

From: Martin Basti mba...@redhat.com
To: Aleš Mareček amare...@redhat.com, freeipa-devel@redhat.com
Sent: Tuesday, March 24, 2015 4:39:21 PM
Subject: Re: [Freeipa-devel] [PATCH] 0001 ipatests: SOA record
Maintenance tests

On 24/03/15 15:06, Aleš Mareček wrote:

Greetings!
This is my very first patch, ticket#4746.

Have a nice day!
   - alich -



Thank you for the patch. Just nitpicks:

1)
+cleanup_commands = [
+('dnszone_del', [zone6], {'continue': True}),
+('dnszone_del', [zone6b], {'continue': True}),
+]

would be better do it in this way, continue option will to try remove
all zones:
+cleanup_commands = [
+('dnszone_del', [zone6, zone6b], {'continue': True}),
+]


Done.


2)
I'm fine with zone6b, but was there any reason to create zone6b, instead
of reusing zone 1 or 2 or 3?

Because of some updates needs, I didn't want to break anything
existing thus I created new.


3)
Please fix whitespace errors.
$ git am
freeipa-alich-0001-ipatests-added-tests-for-SOA-record-Maintenance.patch
Applying: ipatests - added tests for SOA record Maintenance
/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:482: trailing
whitespace.

/home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:758: new blank
line at EOF.
+
warning: 2 lines add whitespace errors.


Done.
$ git am freeipa-alich-0001-2-Ipatests-DNS-SOA-Record-Maintenance.patch
Applying: Ipatests DNS SOA Record Maintenance
$


4)
I know the dns plugin tests are so far from PEP8, but try to keep PEP8
in new code

Done, only 1 line persisted that I didn't want to break:
zone6_unresolvable_ns_relative_dnsname =
DNSName(zone6_unresolvable_ns_relative)


Otherwise test works as expected.

Martin^2

--
Martin Basti



Thanks!
  - alich -

Thank you, ACK.



Pushed to:
master: ca96ecbf40038d09814f99f19bf47246352dfa0c
ipa-4-1: 8f94ac1e7c24b3bf33c5211d3e327c9a51390fb1

--
Jan Cholasta

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH] 0001-2 ipatests: SOA record Maintenance tests

2015-03-27 Thread Aleš Mareček
Greetings!
Martin, thanks for your review and comments!
I changed the name of the patch and setup my git variables properly. I also 
re-tested it and got all passed. I'm sending a new patch that is attached.

- Original Message -
 From: Martin Basti mba...@redhat.com
 To: Aleš Mareček amare...@redhat.com, freeipa-devel@redhat.com
 Sent: Tuesday, March 24, 2015 4:39:21 PM
 Subject: Re: [Freeipa-devel] [PATCH] 0001 ipatests: SOA record Maintenance 
 tests
 
 On 24/03/15 15:06, Aleš Mareček wrote:
  Greetings!
  This is my very first patch, ticket#4746.
 
  Have a nice day!
- alich -
 
 
 Thank you for the patch. Just nitpicks:
 
 1)
 +cleanup_commands = [
 +('dnszone_del', [zone6], {'continue': True}),
 +('dnszone_del', [zone6b], {'continue': True}),
 +]
 
 would be better do it in this way, continue option will to try remove
 all zones:
 +cleanup_commands = [
 +('dnszone_del', [zone6, zone6b], {'continue': True}),
 +]
 

Done.

 2)
 I'm fine with zone6b, but was there any reason to create zone6b, instead
 of reusing zone 1 or 2 or 3?

Because of some updates needs, I didn't want to break anything existing thus I 
created new.

 
 3)
 Please fix whitespace errors.
 $ git am
 freeipa-alich-0001-ipatests-added-tests-for-SOA-record-Maintenance.patch
 Applying: ipatests - added tests for SOA record Maintenance
 /home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:482: trailing
 whitespace.
 
 /home/mbasti/work/freeipa-devel/.git/rebase-apply/patch:758: new blank
 line at EOF.
 +
 warning: 2 lines add whitespace errors.
 

Done.
$ git am freeipa-alich-0001-2-Ipatests-DNS-SOA-Record-Maintenance.patch
Applying: Ipatests DNS SOA Record Maintenance
$

 4)
 I know the dns plugin tests are so far from PEP8, but try to keep PEP8
 in new code

Done, only 1 line persisted that I didn't want to break:
zone6_unresolvable_ns_relative_dnsname = DNSName(zone6_unresolvable_ns_relative)

 
 Otherwise test works as expected.
 
 Martin^2
 
 --
 Martin Basti
 
 

Thanks!
 - alich -
From fcd2078d138f768383df78896d44e51b606ada3b Mon Sep 17 00:00:00 2001
From: Ales 'alich' Marecek amare...@redhat.com
Date: Fri, 27 Mar 2015 16:17:10 +0100
Subject: [PATCH] Ipatests DNS SOA Record Maintenance

https://fedorahosted.org/freeipa/ticket/4746
---
 ipatests/test_xmlrpc/test_dns_plugin.py | 757 
 1 file changed, 757 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_dns_plugin.py b/ipatests/test_xmlrpc/test_dns_plugin.py
index 47251ff68e829a0e0944633bd6243e2c2f79935c..a226c80486e4d44a44714a2f7d03e1049d4d37a8 100644
--- a/ipatests/test_xmlrpc/test_dns_plugin.py
+++ b/ipatests/test_xmlrpc/test_dns_plugin.py
@@ -120,6 +120,51 @@ zone5_ns_dnsname = DNSName(zone5_ns)
 zone5_rname = u'root.%s' % zone5
 zone5_rname_dnsname = DNSName(zone5_rname)
 
+zone6b = u'zone6b.test'
+zone6b_absolute = u'%s.' % zone6b
+zone6b_dnsname = DNSName(zone6b)
+zone6b_absolute_dnsname = DNSName(zone6b_absolute)
+zone6b_dn = DN(('idnsname', zone6b), api.env.container_dns, api.env.basedn)
+zone6b_absolute_dn = DN(('idnsname', zone6b_absolute),
+api.env.container_dns, api.env.basedn)
+zone6b_rname = u'hostmaster'
+zone6b_rname_dnsname = DNSName(zone6b_rname)
+zone6b_ip = u'172.16.70.1'
+zone6b_ns_arec = u'ns'
+zone6b_ns = u'%s.%s' % (zone6b_ns_arec, zone6b_absolute)
+zone6b_ns_arec_dnsname = DNSName(zone6b_ns_arec)
+zone6b_ns_arec_dn = DN(('idnsname', zone6b_ns_arec), zone6b_dn)
+zone6b_ns_dnsname = DNSName(zone6b_ns)
+zone6b_absolute_arec_dn = DN(('idnsname', zone6b_ns_arec), zone6b_absolute_dn)
+
+zone6 = u'zone6.test'
+zone6_invalid = u'invalid-zone.zone6..test'
+zone6_absolute = u'%s.' % zone6
+zone6_dnsname = DNSName(zone6)
+zone6_absolute_dnsname = DNSName(zone6_absolute)
+zone6_dn = DN(('idnsname', zone6), api.env.container_dns, api.env.basedn)
+zone6_absolute_dn = DN(('idnsname', zone6_absolute),
+   api.env.container_dns, api.env.basedn)
+zone6_ns_relative = u'ns1'
+zone6_absolute_arec_dn = DN(('idnsname', zone6_ns_relative), zone6_absolute_dn)
+zone6_ns = u'%s.%s' % (zone6_ns_relative, zone6_absolute)
+zone6_ns_relative_dnsname = DNSName(zone6_ns_relative)
+zone6_ns_dnsname = DNSName(zone6_ns)
+zone6_ns_arec_dnsname = DNSName(zone6_ns_relative)
+zone6_ns_invalid_dnsname = u'invalid name server! ..%s' % zone6_absolute
+zone6_rname = u'root.%s' % zone6_absolute
+zone6_rname_dnsname = DNSName(zone6_rname)
+zone6_rname_default = u'hostmaster'
+zone6_rname_default_dnsname = DNSName(zone6_rname_default)
+zone6_rname_relative_dnsname = DNSName(u'root')
+zone6_rname_absolute_dnsname = DNSName(u'root.%s' % zone6_absolute)
+zone6_rname_invalid_dnsname = u'invalid ! @ ! .. root..%s' % zone6_absolute
+zone6_unresolvable_ns_relative = u'unresolvable'
+zone6_unresolvable_ns = u'%s.%s' % (zone6_unresolvable_ns_relative,
+zone6_absolute)
+zone6_unresolvable_ns_dnsname = DNSName(zone6_unresolvable_ns)