Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mwdeploy: fix text check for beta #4095

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading