Attached patch fixes vault tests.
From dd83cf44e1529be53990978e77d47a0d22c85a8b Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Fri, 4 Sep 2015 13:32:56 +0200
Subject: [PATCH] FIX vault tests

---
 ipatests/test_xmlrpc/test_vault_plugin.py | 39 ++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/ipatests/test_xmlrpc/test_vault_plugin.py b/ipatests/test_xmlrpc/test_vault_plugin.py
index 758d864ce6d100dfdafa89f45c875e8beba447bd..6992005b8ce982866d62de15be7348ba417645ce 100644
--- a/ipatests/test_xmlrpc/test_vault_plugin.py
+++ b/ipatests/test_xmlrpc/test_vault_plugin.py
@@ -170,6 +170,7 @@ class test_vault_plugin(Declarative):
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -191,6 +192,7 @@ class test_vault_plugin(Declarative):
                               % (vault_name, api.env.basedn),
                         'cn': [vault_name],
                         'ipavaulttype': [u'standard'],
+                        'username': u'admin',
                     },
                 ],
             },
@@ -212,6 +214,7 @@ class test_vault_plugin(Declarative):
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -233,6 +236,7 @@ class test_vault_plugin(Declarative):
                     'description': [u'Test vault'],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -267,12 +271,14 @@ class test_vault_plugin(Declarative):
                 'value': vault_name,
                 'summary': u'Added vault "%s"' % vault_name,
                 'result': {
-                    'dn': u'cn=%s,cn=%s,cn=services,cn=vaults,cn=kra,%s'
-                          % (vault_name, service_name, api.env.basedn),
+                    'dn': u'cn=%s,cn=%s@%s,cn=services,cn=vaults,cn=kra,%s'
+                          % (vault_name, service_name, api.env.realm,
+                             api.env.basedn),
                     'objectclass': [u'top', u'ipaVault'],
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'service': "%s@%s" % (service_name, api.env.realm),
                 },
             },
         },
@@ -292,10 +298,12 @@ class test_vault_plugin(Declarative):
                 'summary': u'1 vault matched',
                 'result': [
                     {
-                        'dn': u'cn=%s,cn=%s,cn=services,cn=vaults,cn=kra,%s'
-                              % (vault_name, service_name, api.env.basedn),
+                        'dn': u'cn=%s,cn=%s@%s,cn=services,cn=vaults,cn=kra,%s'
+                              % (vault_name, service_name, api.env.realm,
+                                 api.env.basedn),
                         'cn': [vault_name],
                         'ipavaulttype': [u'standard'],
+                        'service': '%s@%s' % (service_name, api.env.realm),
                     },
                 ],
             },
@@ -314,11 +322,13 @@ class test_vault_plugin(Declarative):
                 'value': vault_name,
                 'summary': None,
                 'result': {
-                    'dn': u'cn=%s,cn=%s,cn=services,cn=vaults,cn=kra,%s'
-                          % (vault_name, service_name, api.env.basedn),
+                    'dn': u'cn=%s,cn=%s@%s,cn=services,cn=vaults,cn=kra,%s'
+                          % (vault_name, service_name, api.env.realm,
+                             api.env.basedn),
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'service': "%s@%s" % (service_name, api.env.realm),
                 },
             },
         },
@@ -341,6 +351,7 @@ class test_vault_plugin(Declarative):
                     'description': [u'Test vault'],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'service': "%s@%s" % (service_name, api.env.realm),
                 },
             },
         },
@@ -383,6 +394,7 @@ class test_vault_plugin(Declarative):
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'shared': True,
                 },
             },
         },
@@ -406,6 +418,7 @@ class test_vault_plugin(Declarative):
                               % (vault_name, api.env.basedn),
                         'cn': [vault_name],
                         'ipavaulttype': [u'standard'],
+                        'shared': True,
                     },
                 ],
             },
@@ -429,6 +442,7 @@ class test_vault_plugin(Declarative):
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'shared': True,
                 },
             },
         },
@@ -451,6 +465,7 @@ class test_vault_plugin(Declarative):
                     'description': [u'Test vault'],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'shared': True,
                 },
             },
         },
@@ -493,6 +508,7 @@ class test_vault_plugin(Declarative):
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': user_name,
                 },
             },
         },
@@ -516,6 +532,7 @@ class test_vault_plugin(Declarative):
                               % (vault_name, user_name, api.env.basedn),
                         'cn': [vault_name],
                         'ipavaulttype': [u'standard'],
+                        'username': user_name,
                     },
                 ],
             },
@@ -539,6 +556,7 @@ class test_vault_plugin(Declarative):
                     'cn': [vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': user_name,
                 },
             },
         },
@@ -561,6 +579,7 @@ class test_vault_plugin(Declarative):
                     'description': [u'Test vault'],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': user_name,
                 },
             },
         },
@@ -602,6 +621,7 @@ class test_vault_plugin(Declarative):
                     'cn': [standard_vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -658,6 +678,7 @@ class test_vault_plugin(Declarative):
                     'ipavaulttype': [u'symmetric'],
                     'ipavaultsalt': [fuzzy_string],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -703,6 +724,7 @@ class test_vault_plugin(Declarative):
                     'ipavaulttype': [u'symmetric'],
                     'ipavaultsalt': [fuzzy_string],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -762,6 +784,7 @@ class test_vault_plugin(Declarative):
                     'ipavaulttype': [u'symmetric'],
                     'ipavaultsalt': [fuzzy_string],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -804,6 +827,7 @@ class test_vault_plugin(Declarative):
                     'ipavaulttype': [u'asymmetric'],
                     'ipavaultpublickey': [public_key],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -849,6 +873,7 @@ class test_vault_plugin(Declarative):
                     'ipavaulttype': [u'asymmetric'],
                     'ipavaultpublickey': [public_key],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -907,6 +932,7 @@ class test_vault_plugin(Declarative):
                     'ipavaulttype': [u'asymmetric'],
                     'ipavaultpublickey': [other_public_key],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
@@ -947,6 +973,7 @@ class test_vault_plugin(Declarative):
                     'cn': [asymmetric_vault_name],
                     'ipavaulttype': [u'standard'],
                     'owner_user': [u'admin'],
+                    'username': u'admin',
                 },
             },
         },
-- 
2.4.3

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

Reply via email to