Re: [Freeipa-devel] [PATCH 0107] test: cert: Reflect change in behavior in tests

2016-06-29 Thread Martin Basti



On 29.06.2016 14:13, Petr Spacek wrote:

On 28.6.2016 16:58, David Kupka wrote:

--
David Kupka

freeipa-dkupka-0107.0-test-cert-Reflect-change-in-behavior-in-tests.patch


 From 4331e9a62a3cea81b548c555001a7d7ed1127574 Mon Sep 17 00:00:00 2001
From: David Kupka 
Date: Tue, 28 Jun 2016 10:47:10 +0200
Subject: [PATCH] test: cert: Reflect change in behavior in tests

Command cert-find with parameter sizelimit set to 0 no longer returns 0
certificates but returns all.

More precise ConversionError is returned when parameter is not
convertible to its type.

https://fedorahosted.org/freeipa/ticket/5381
https://fedorahosted.org/freeipa/ticket/4739
---
  ipatests/test_xmlrpc/test_cert_plugin.py | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py 
b/ipatests/test_xmlrpc/test_cert_plugin.py
index 
1a6168da29393eb041273da3bbfa845858cdaf72..8127ef224b24a0b3a63c3d07ef72d4b53feda4be
 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -429,8 +429,9 @@ class test_cert_find(XMLRPC_test):
  """
  Search with a sizelimit of 0
  """
+count_all = api.Command['cert_find']()['count']
  res = api.Command['cert_find'](sizelimit=0)
-assert 'count' in res and res['count'] == 0
+assert 'count' in res and res['count'] == count_all
  
  @raises(errors.ValidationError)

  def test_0028_find_negative_size(self):
@@ -453,7 +454,7 @@ class test_cert_find(XMLRPC_test):
  res = api.Command['cert_find'](subject=u'ipatestcert.%s' % 
api.env.domain)
  assert 'count' in res and res['count'] >= 1
  
-@raises(errors.ValidationError)

+@raises(errors.ConversionError)
  def test_0031_search_on_invalid_date(self):
  """
  Search using invalid date format
-- 2.7.4

ACK


Pushed to master: 573819eb07ea67311004850b7726f3368bacb49b

--
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 0107] test: cert: Reflect change in behavior in tests

2016-06-29 Thread Petr Spacek
On 28.6.2016 16:58, David Kupka wrote:
> 
> -- 
> David Kupka
> 
> freeipa-dkupka-0107.0-test-cert-Reflect-change-in-behavior-in-tests.patch
> 
> 
> From 4331e9a62a3cea81b548c555001a7d7ed1127574 Mon Sep 17 00:00:00 2001
> From: David Kupka 
> Date: Tue, 28 Jun 2016 10:47:10 +0200
> Subject: [PATCH] test: cert: Reflect change in behavior in tests
> 
> Command cert-find with parameter sizelimit set to 0 no longer returns 0
> certificates but returns all.
> 
> More precise ConversionError is returned when parameter is not
> convertible to its type.
> 
> https://fedorahosted.org/freeipa/ticket/5381
> https://fedorahosted.org/freeipa/ticket/4739
> ---
>  ipatests/test_xmlrpc/test_cert_plugin.py | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py 
> b/ipatests/test_xmlrpc/test_cert_plugin.py
> index 
> 1a6168da29393eb041273da3bbfa845858cdaf72..8127ef224b24a0b3a63c3d07ef72d4b53feda4be
>  100644
> --- a/ipatests/test_xmlrpc/test_cert_plugin.py
> +++ b/ipatests/test_xmlrpc/test_cert_plugin.py
> @@ -429,8 +429,9 @@ class test_cert_find(XMLRPC_test):
>  """
>  Search with a sizelimit of 0
>  """
> +count_all = api.Command['cert_find']()['count']
>  res = api.Command['cert_find'](sizelimit=0)
> -assert 'count' in res and res['count'] == 0
> +assert 'count' in res and res['count'] == count_all
>  
>  @raises(errors.ValidationError)
>  def test_0028_find_negative_size(self):
> @@ -453,7 +454,7 @@ class test_cert_find(XMLRPC_test):
>  res = api.Command['cert_find'](subject=u'ipatestcert.%s' % 
> api.env.domain)
>  assert 'count' in res and res['count'] >= 1
>  
> -@raises(errors.ValidationError)
> +@raises(errors.ConversionError)
>  def test_0031_search_on_invalid_date(self):
>  """
>  Search using invalid date format
> -- 2.7.4

ACK

-- 
Petr^2 Spacek

-- 
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


[Freeipa-devel] [PATCH 0107] test: cert: Reflect change in behavior in tests

2016-06-28 Thread David Kupka


--
David Kupka
From 4331e9a62a3cea81b548c555001a7d7ed1127574 Mon Sep 17 00:00:00 2001
From: David Kupka 
Date: Tue, 28 Jun 2016 10:47:10 +0200
Subject: [PATCH] test: cert: Reflect change in behavior in tests

Command cert-find with parameter sizelimit set to 0 no longer returns 0
certificates but returns all.

More precise ConversionError is returned when parameter is not
convertible to its type.

https://fedorahosted.org/freeipa/ticket/5381
https://fedorahosted.org/freeipa/ticket/4739
---
 ipatests/test_xmlrpc/test_cert_plugin.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index 1a6168da29393eb041273da3bbfa845858cdaf72..8127ef224b24a0b3a63c3d07ef72d4b53feda4be 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -429,8 +429,9 @@ class test_cert_find(XMLRPC_test):
 """
 Search with a sizelimit of 0
 """
+count_all = api.Command['cert_find']()['count']
 res = api.Command['cert_find'](sizelimit=0)
-assert 'count' in res and res['count'] == 0
+assert 'count' in res and res['count'] == count_all
 
 @raises(errors.ValidationError)
 def test_0028_find_negative_size(self):
@@ -453,7 +454,7 @@ class test_cert_find(XMLRPC_test):
 res = api.Command['cert_find'](subject=u'ipatestcert.%s' % api.env.domain)
 assert 'count' in res and res['count'] >= 1
 
-@raises(errors.ValidationError)
+@raises(errors.ConversionError)
 def test_0031_search_on_invalid_date(self):
 """
 Search using invalid date format
-- 
2.7.4

-- 
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