[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Almost done with 0.0.4rc3.



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv2764/lib/mixminion

Modified Files:
	Main.py __init__.py test.py 
Log Message:
Almost done with 0.0.4rc3.

README:
- Add what's-new.

setup, __init__, ServerList:
- Bump versions

test:
- Add a few more unit tests

MMTPServer:
- Improve some log messages



Index: Main.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Main.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- Main.py	6 Jun 2003 06:04:57 -0000	1.48
+++ Main.py	6 Jun 2003 07:17:35 -0000	1.49
@@ -205,7 +205,7 @@
         printUsage()
         sys.exit(1)
 
-    if args[1] not in ('unittests', 'benchmarks'):
+    if args[1] not in ('unittests', 'benchmarks', 'version'):
         print "This software is for testing purposes only."\
               "  Anonymity is not guaranteed."
 

Index: __init__.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/__init__.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- __init__.py	5 Jun 2003 05:24:23 -0000	1.37
+++ __init__.py	6 Jun 2003 07:17:35 -0000	1.38
@@ -7,7 +7,7 @@
    """
 
 # This version string is generated from setup.py; don't edit it.
-__version__ = "0.0.4rc2"
+__version__ = "0.0.4rc3"
 # This 5-tuple encodes the version number for comparison.  Don't edit it.
 # The first 3 numbers are the version number; the 4th is:
 #          0 for alpha
@@ -18,7 +18,7 @@
 # The 4th or 5th number may be a string.  If so, it is not meant to
 #   succeed or preceed any other sub-version with the same a.b.c version
 #   number.
-version_info = (0, 0, 4, 99, 2)
+version_info = (0, 0, 4, 99, 3)
 __all__ = [ 'server', 'directory' ]
 
 def version_tuple_to_string(t):

Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- test.py	6 Jun 2003 06:04:58 -0000	1.119
+++ test.py	6 Jun 2003 07:17:35 -0000	1.120
@@ -4952,11 +4952,41 @@
         self.assertEquals(vu, keyring.getNextKeyRotation())
 
         # Check the second key we created.
-        va, vu, curKey = keyring._getLiveKeys(vu + 3600)[0]
+        key2time = vu+3600
+        va, vu, curKey = keyring._getLiveKeys(key2time)[0]
         self.assertEquals(va, finish)
         self.assertEquals(vu, mixminion.Common.previousMidnight(
             finish+10*24*60*60+60))
 
+        # Does published-marking work right?
+        self.assert_(not curKey.isPublished())
+        curKey.markAsPublished()
+        self.assert_(curKey.isPublished())
+        keyring.checkKeys()
+        va, vu, curKey = keyring._getLiveKeys(key2time)[0]
+        self.assert_(curKey.isPublished())
+        curKey.markAsUnpublished()
+        self.assert_(not curKey.isPublished())
+        keyring.checkKeys()
+        va, vu, curKey = keyring._getLiveKeys(key2time)[0]
+        self.assert_(not curKey.isPublished())
+        curKey.markAsPublished()
+
+        # Does 'regenerate' work?
+        cfg2 = SERVERCFG%{'home':_FAKE_HOME}
+        cfg2 = cfg2.replace("10.0.0.1", "10.0.0.2")
+        config2 = mixminion.server.ServerConfig.ServerConfig(string=cfg2)
+
+        self.assert_(curKey.isPublished())
+        curKey.load()
+        key0 = curKey.getPacketKeyID()
+        curKey.regenerateServerDescriptor(config2, keyring.getIdentityKey())
+        self.assert_(not curKey.isPublished())
+        inf = curKey.getServerDescriptor()
+        self.assertEquals(inf['Incoming/MMTP']['IP'], "10.0.0.2")
+        curKey.load()
+        self.assertEquals(key0, curKey.getPacketKeyID())
+
         # Make a key in the past, to see if it gets scrubbed.
         keyring.createKeys(1, mixminion.Common.previousMidnight(
             start - 10*24*60*60 + 1))
@@ -4979,8 +5009,7 @@
             # Test getTLSContext
             keyring._getTLSContext()
 
-        # Test getPacketHandler
-        #_ = keyring.getPacketHandler()
+
 
 
 #----------------------------------------------------------------------
@@ -5864,7 +5893,7 @@
     LOG.setMinSeverity("FATAL")
     mixminion.Common.secureDelete([],1)
 
-    # Don't complain about owner on /tmp, no matter who is is.
+    # Don't complain about owner on /tmp, no matter who it is.
     mixminion.Common._VALID_DIRECTORIES["/tmp"] = 1
     mixminion.Common._VALID_DIRECTORIES["/var/tmp"] = 1