@@ -23,15 +23,16 @@ def __init__(
23
23
self .mq_ws_url = "https://" + env .get ("MQ_WS_URL" , "019999" )
24
24
self .mq_ws_login = env .get ("MQ_WS_LOGIN" , "testuser" )
25
25
self .mq_ws_password = env .get ("MQ_WS_PASSWORD" , "test" )
26
- self .hostname = env .get ('HOSTNAME' )
26
+ self .hostname = env .get ("HOSTNAME" )
27
+ self .bigbang = env .get ("BIGBANG" , "False" )
27
28
28
29
self .instance1_conf = '/plone/parts/instance/etc/zope.conf'
29
30
self .instance_amqp_conf = '/plone/parts/instance-amqp/etc/zope.conf'
30
31
self .instance_async_conf = '/plone/parts/instance-async/etc/zope.conf'
31
32
self .instance_debug_conf = '/plone/parts/instance-debug/etc/zope.conf'
32
33
self .zeoserver_conf = '/plone/parts/zeoserver/etc/zeo.conf'
33
34
34
- def _fix (self , path , activate_big_bang ):
35
+ def _fix (self , path ):
35
36
with open (path ) as file :
36
37
filedata = file .read ()
37
38
filedata = re .sub (r'server.*?8100' , 'server ' + self .server , filedata )
@@ -41,16 +42,16 @@ def _fix(self, path, activate_big_bang):
41
42
filedata = re .sub (r'cache-size.*?1000MB' , 'cache-size ' + self .zeo_client_cache_size , filedata )
42
43
filedata = re .sub (r'cache-size.*?100000' , 'cache-size ' + self .zodb_cache_size , filedata )
43
44
filedata = filedata .replace ('Plone/@@cron-tick' , self .plone_path + '/@@cron-tick ' )
44
- filedata = re .sub (r'ACTIVE_BIGBANG.*?(True|False)' , 'ACTIVE_BIGBANG ' + str ( activate_big_bang ) , filedata )
45
+ filedata = re .sub (r'ACTIVE_BIGBANG.*?(True|False)' , 'ACTIVE_BIGBANG ' + self . bigbang , filedata )
45
46
filedata = re .sub (r'path /data/log/instance.*.log' , 'path /data/log/' + self .hostname + '.log' , filedata )
46
47
filedata = re .sub (r'path /plone/var/log/instance.*-Z2.log' ,
47
48
'path /data/log/' + self .hostname + '-Z2.log' ,
48
- filedata )
49
+ filedata )<
49
50
filedata = re .sub (r'SITE_ID .*' , 'SITE_ID ' + self .plone_path , filedata )
50
51
return filedata
51
52
52
- def _fix_conf (self , path , activate_big_bang ):
53
- filedata = self ._fix (path , activate_big_bang )
53
+ def _fix_conf (self , path ):
54
+ filedata = self ._fix (path )
54
55
filedata = re .sub (r'password.*?admin' , 'password ' + self .admin_password , filedata )
55
56
filedata = re .sub (r'ADMIN_PASSWORD.*?admin' , 'ADMIN_PASSWORD ' + self .admin_password , filedata )
56
57
with open (path , 'w' ) as file :
@@ -83,14 +84,14 @@ def _fix_amqp(self, path):
83
84
def fixtures (self ):
84
85
""" ZEO Client
85
86
"""
86
- self ._fix_conf (self .instance1_conf , True )
87
- self ._fix_conf (self .instance_async_conf , False )
88
- self ._fix_conf (self .instance_amqp_conf , False )
87
+ self ._fix_conf (self .instance1_conf )
88
+ self ._fix_conf (self .instance_async_conf )
89
+ self ._fix_conf (self .instance_amqp_conf )
89
90
# instance debug doesn't exist in dev env
90
91
if os .path .exists (self .instance_debug_conf ):
91
- self ._fix_conf (self .instance_debug_conf , False )
92
+ self ._fix_conf (self .instance_debug_conf )
92
93
self ._fix_amqp (self .instance_debug_conf )
93
- self ._fix_conf (self .zeoserver_conf , False )
94
+ self ._fix_conf (self .zeoserver_conf )
94
95
self ._fix_amqp (self .instance1_conf )
95
96
self ._fix_amqp (self .instance_amqp_conf )
96
97
0 commit comments