kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-2879: Make MiniKDC test service slightly more generic
Date Tue, 24 Nov 2015 00:14:26 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk f81dd4a4f -> e32df4722


KAFKA-2879: Make MiniKDC test service slightly more generic

Author: Gwen Shapira <cshapi@gmail.com>

Reviewers: Ewen Cheslack-Postava

Closes #578 from gwenshap/KAFKA-2879


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/e32df472
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/e32df472
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/e32df472

Branch: refs/heads/trunk
Commit: e32df4722ca476ab373cca45a824f712cf4943ef
Parents: f81dd4a
Author: Gwen Shapira <cshapi@gmail.com>
Authored: Mon Nov 23 16:14:23 2015 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Mon Nov 23 16:14:23 2015 -0800

----------------------------------------------------------------------
 tests/kafkatest/services/security/minikdc.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e32df472/tests/kafkatest/services/security/minikdc.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/security/minikdc.py b/tests/kafkatest/services/security/minikdc.py
index b8d9c6a..7ba1611 100644
--- a/tests/kafkatest/services/security/minikdc.py
+++ b/tests/kafkatest/services/security/minikdc.py
@@ -38,9 +38,10 @@ class MiniKdc(Service):
     LOCAL_KEYTAB_FILE = "/tmp/keytab"
     LOCAL_KRB5CONF_FILE = "/tmp/krb5.conf"
 
-    def __init__(self, context, kafka_nodes):
+    def __init__(self, context, kafka_nodes, extra_principals = ""):
         super(MiniKdc, self).__init__(context, 1)
         self.kafka_nodes = kafka_nodes
+        self.extra_principals = extra_principals
 
     def replace_in_file(self, file_path, pattern, subst):
         fh, abs_path = mkstemp()
@@ -62,7 +63,7 @@ class MiniKdc(Service):
         self.logger.info(props_file)
 
         kafka_principals = ' '.join(['kafka/' + kafka_node.account.hostname for kafka_node
in self.kafka_nodes])
-        principals = 'client ' + kafka_principals
+        principals = 'client ' + kafka_principals + self.extra_principals
         self.logger.info("Starting MiniKdc with principals " + principals)
 
         lib_dir = "/opt/%s/core/build/dependant-testlibs" % kafka_dir(node)


Mime
View raw message