Release 0.8.0: Windows installer, twelve fixes from a real Server 2019 install, operator docs
This commit is contained in:
@@ -53,3 +53,54 @@ def test_every_wizard_exclusion_is_a_real_plugin():
|
||||
for name in wizard_excludes():
|
||||
assert (PLUGINS / name / 'manifest.json').exists(), (
|
||||
'%s is excluded by the wizard but has no manifest' % name)
|
||||
|
||||
|
||||
# The preflight blocks the wizard on any FAIL. That is correct for something the
|
||||
# operator must go and fix, and wrong for anything the installer carries in its
|
||||
# own bundle - there, blocking stops the wizard over something it was about to do
|
||||
# itself, with no way forward.
|
||||
BUNDLE_SUPPLIED = [
|
||||
'HttpPlatformHandler', # httpplatformhandler\*.msi, installed by stage 4
|
||||
'URL Rewrite', # urlrewrite\*.msi, installed by stage 4
|
||||
]
|
||||
|
||||
PREFLIGHT = REPO / 'deploy' / 'windows' / 'installer' / 'shopdb-preflight.ps1'
|
||||
|
||||
|
||||
def test_nothing_the_bundle_supplies_is_a_blocker():
|
||||
"""Regression: HttpPlatformHandler was a FAIL, so a server without it could
|
||||
not get past the preflight page - to install the very thing that was
|
||||
missing."""
|
||||
text = PREFLIGHT.read_text(encoding='utf-8', errors='replace')
|
||||
offenders = []
|
||||
for line in text.splitlines():
|
||||
if "'FAIL'" not in line:
|
||||
continue
|
||||
for component in BUNDLE_SUPPLIED:
|
||||
if component.lower() in line.lower():
|
||||
offenders.append(line.strip())
|
||||
assert not offenders, (
|
||||
'the installer supplies these, so they must not block the wizard:\n %s'
|
||||
% '\n '.join(offenders))
|
||||
|
||||
|
||||
def test_installer_controlled_paths_have_no_spaces():
|
||||
"""msiexec and bootstrapper command lines split on spaces.
|
||||
|
||||
The installer passes these as PROPERTY=value / TargetDir=value on a command
|
||||
line. A value containing a space has to be quoted as PROPERTY="C:\\..." -
|
||||
quoting the whole token instead makes the tool reject the line and print its
|
||||
usage dialog, which is what 'the bundled MySQL database could not be
|
||||
installed' looked like from the outside. The Python target was already
|
||||
space-free for this exact reason; MySQL was not.
|
||||
"""
|
||||
text = PREFLIGHT.parent.joinpath('shopdb-install.ps1').read_text(
|
||||
encoding='utf-8', errors='replace')
|
||||
offenders = []
|
||||
for line in text.splitlines():
|
||||
match = re.match(r"\s*\[string\]\s*\$(Mysql\w*|PyTarget)\s*=\s*'([^']+)'", line)
|
||||
if match and ' ' in match.group(2):
|
||||
offenders.append('%s = %s' % (match.group(1), match.group(2)))
|
||||
assert not offenders, (
|
||||
'these are passed on a command line and must not contain spaces:\n %s'
|
||||
% '\n '.join(offenders))
|
||||
|
||||
Reference in New Issue
Block a user