[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Patch for bug in serverinfo generation
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv25112/lib/mixminion
Modified Files:
test.py
Log Message:
Patch for bug in serverinfo generation
Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- test.py 12 Dec 2002 19:56:46 -0000 1.47
+++ test.py 15 Dec 2002 04:35:54 -0000 1.48
@@ -2721,6 +2721,7 @@
EncryptIdentityKey: no
PublicKeyLifetime: 10 days
EncryptPrivateKey: no
+Homedir: %s
Mode: relay
Nickname: The Server
Contact-Email: a@b.c
@@ -2748,6 +2749,7 @@
EncryptIdentityKey: no
PublicKeyLifetime: 10 days
EncryptPrivateKey: no
+Homedir: %s
Mode: relay
Nickname: fred-the-bunny
"""
@@ -2760,7 +2762,7 @@
d = mix_mktemp()
try:
suspendLog()
- conf = mixminion.server.ServerConfig.ServerConfig(string=SERVER_CONFIG)
+ conf = mixminion.server.ServerConfig.ServerConfig(string=(SERVER_CONFIG % mix_mktemp()))
finally:
resumeLog()
if not os.path.exists(d):
@@ -2824,7 +2826,7 @@
# Now with a shorter configuration
try:
suspendLog()
- conf = mixminion.server.ServerConfig.ServerConfig(string=SERVER_CONFIG_SHORT+
+ conf = mixminion.server.ServerConfig.ServerConfig(string=(SERVER_CONFIG_SHORT%mix_mktemp())+
"""[Incoming/MMTP]
Enabled: yes
IP: 192.168.0.99
@@ -2914,8 +2916,7 @@
writeFile(os.path.join(mod_dir, "ExampleMod.py"),
EXAMPLE_MODULE_TEXT)
- cfg_test = SERVER_CONFIG_SHORT + """
-Homedir = %s
+ cfg_test = (SERVER_CONFIG_SHORT%home_dir) + """
ModulePath = %s
Module ExampleMod.TestModule
[Example]
@@ -2923,7 +2924,7 @@
[Incoming/MMTP]
Enabled: yes
IP: 1.0.0.1
-""" % (home_dir, mod_dir)
+""" % (mod_dir)
try:
suspendLog()
@@ -3016,11 +3017,10 @@
# Try again, this time with the test module disabled.
#
- cfg_test = SERVER_CONFIG_SHORT + """
-Homedir = %s
+ cfg_test = (SERVER_CONFIG_SHORT%home_dir) + """
ModulePath = %s
Module ExampleMod.TestModule
-""" % (home_dir, mod_dir)
+""" % (mod_dir)
try:
suspendLog()
@@ -3038,13 +3038,12 @@
self.failIf(exampleMod is manager.typeToModule.get(1234))
# Failing validation
- cfg_test = SERVER_CONFIG_SHORT + """
-Homedir = %s
+ cfg_test = SERVER_CONFIG_SHORT%home_dir + """
ModulePath = %s
Module ExampleMod.TestModule
[Example]
Foo: 100
-""" % (home_dir, mod_dir)
+""" % (mod_dir)
# FFFF Add tests for catching exceptions from buggy modules
@@ -3301,7 +3300,7 @@
def getManager(self):
d = mix_mktemp()
- c = SERVER_CONFIG_SHORT+"\nHomedir: %s\n"%d
+ c = SERVER_CONFIG_SHORT % d
try:
suspendLog()
conf = mixminion.server.ServerConfig.ServerConfig(string=c)