[Libvirt-cim] [PATCH] [TEST] #2 Fix key generation

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Thu Mar 19 20:48:34 UTC 2009


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1237495701 25200
# Node ID ddf78929ebf1b58e5c48a58d7678c47d8f7c913b
# Parent  5bafbcfb09fd3fb9c4cf532488c92d9ddefc663c
[TEST] #2 Fix key generation

Updates:
  -Remove commented out lines of code.

Instead of setting up the ssh keys prior to each test run, the keys need to be
setup before main.py is called. This fixes the issue where cimtest would
complain if an id_rsa key wasn't already available.

Now, if the key isn't available, it generates one. Otherwise, it uses the
available key.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 5bafbcfb09fd -r ddf78929ebf1 runtests
--- a/runtests	Wed Mar 18 06:41:56 2009 -0700
+++ b/runtests	Thu Mar 19 13:48:21 2009 -0700
@@ -22,6 +22,8 @@
 
 import sys
 import os
+sys.path.append('./lib')
+from VirtLib.utils import setup_ssh_key
 
 SUITES_DIR = 'suites'
 MAIN_FILE = 'main.py'
@@ -53,6 +55,8 @@
         print "\t%s" % ", ".join(available_suites())
         return 1
 
+    setup_ssh_key()
+
     suite = sys.argv[1]
     print "Starting test suite: %s" % suite
 
diff -r 5bafbcfb09fd -r ddf78929ebf1 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py	Wed Mar 18 06:41:56 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py	Thu Mar 19 13:48:21 2009 -0700
@@ -138,9 +138,7 @@
                 try:
                     from CimTest.Globals import logger, log_param 
                     log_param()
-                    from VirtLib.utils import setup_ssh_key
                     from XenKvmLib.test_doms import destroy_and_undefine_all
-                    setup_ssh_key()
                     destroy_and_undefine_all(options.ip, options.virt)
                     rc = f()
                 except Exception, e:




More information about the Libvirt-cim mailing list