Skip to content

Commit

Permalink
mwdeploy: fix text check for beta (#4095)
Browse files Browse the repository at this point in the history
  • Loading branch information
RhinosF1 authored Nov 20, 2024
1 parent 92f43fe commit d72683f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/mediawiki/files/bin/mwdeploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def make_request(proto, domain, headers) -> requests.Response:
else:
proto = 'http://'
req = make_request(proto, domain, headers)
if req.status_code == 200 and 'miraheze' in req.text and (Debug is None or Debug in req.headers['X-Served-By']):
if req.status_code == 200 and 'mainpageisdomainroot' in req.text and (Debug is None or Debug in req.headers['X-Served-By']):
up = True
if not up:
print(f'Status: {req.status_code}')
Expand Down
8 changes: 4 additions & 4 deletions modules/mediawiki/files/bin/test_mwscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def test_get_command_extension_list(mock_getlogin):
args.version = '1.39'
assert mwscript.syscheck(mwscript.get_commands(args)) == {
'confirm': False,
'command': f'sudo -u www-data /usr/local/bin/foreachwikiindblist /home/{os.environ["LOGNAME"]}/CheckUser.json /srv/mediawiki/1.39/maintenance/test.php',
'generate': f'php /srv/mediawiki/1.39/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/home/{os.environ["LOGNAME"]}',
'command': 'sudo -u www-data /usr/local/bin/foreachwikiindblist /tmp/CheckUser.json /srv/mediawiki/1.39/maintenance/test.php',
'generate': 'sudo -u www-data php /srv/mediawiki/1.39/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/tmp',
'long': True,
'nolog': False,
}
Expand Down Expand Up @@ -86,8 +86,8 @@ def test_get_command_extension_list_runner(mock_getlogin):
args.version = '1.40'
assert mwscript.syscheck(mwscript.get_commands(args)) == {
'confirm': False,
'command': f'sudo -u www-data /usr/local/bin/foreachwikiindblist /tmp/CheckUser.php /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/maintenance/test.php',
'generate': f'php /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/tmp',
'command': 'sudo -u www-data /usr/local/bin/foreachwikiindblist /tmp/CheckUser.json /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/maintenance/test.php',
'generate': 'sudo -u www-data php /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/tmp',
'long': True,
'nolog': False,
}
Expand Down

0 comments on commit d72683f

Please sign in to comment.