tests: generate mode does not start Glean on firefox-69, and does on 68
This commit is contained in:
1 parent
b1673988b4
commit
13049ab0c9
3 files changed
+20
-4
No files matched your search
@@ -11,5 +11,13 @@
|
||||
"tests/test_a_page_that_moves_on_e2e.py": "a navigation that committed is not cut by the parent: goto answers on our own page, networkidle is reached on the one that replaced it",
|
||||
"tests/test_fakeweb_p2_e2e.py": "under a load of other browsers the page that leaves with beacons reaches networkidle every round (the held cut of a committed navigation); on an older engine the run is made and not judged"
|
||||
}
|
||||
},
|
||||
"firefox-69": {
|
||||
"carries": [
|
||||
"generate mode of the security state does not start Glean at shutdown (telemetry.fog.init_on_shutdown is false)"
|
||||
],
|
||||
"files": {
|
||||
"tests/test_security_state_engine_e2e.py": "generate mode does not start Glean at shutdown"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -265,7 +265,7 @@ def _a_ready_directory_with(root, name, *, state):
|
||||
return directory
|
||||
|
||||
|
||||
def test_the_engine_generates_the_security_state_it_is_given(ff, inputs, tmp_path_factory):
|
||||
def test_the_engine_generates_the_security_state_it_is_given(ff, inputs, tmp_path_factory, engine_reaches):
|
||||
files = inputs
|
||||
work = tmp_path_factory.mktemp("generate")
|
||||
profile = work / "profile"
|
||||
@@ -278,6 +278,13 @@ def test_the_engine_generates_the_security_state_it_is_given(ff, inputs, tmp_pat
|
||||
said = (profile / RESULT_NAME).read_bytes().decode("utf-8") if (profile / RESULT_NAME).is_file() else "no %s" % RESULT_NAME
|
||||
assert code == 0, "the engine in generate mode %s (exit code %r); its result: %s" % (why or "exited", code, said)
|
||||
|
||||
# Glean started inside the shutdown raced Mozilla's own close of its database (exit -11): firefox-69 never starts it in this mode, so its profile has no glean folder.
|
||||
glean = profile / "datareporting" / "glean"
|
||||
if engine_reaches("firefox-69"):
|
||||
assert not glean.exists(), "generate mode started Glean: %s is in the profile (%s)" % (glean, sorted(p.relative_to(glean).as_posix() for p in glean.rglob("*") if p.is_file()))
|
||||
else:
|
||||
assert glean.is_dir(), "firefox-68 starts Glean at the shutdown of generate mode: %s is not in the profile" % glean
|
||||
|
||||
result = json.loads((profile / RESULT_NAME).read_bytes().decode("utf-8"))
|
||||
assert set(result) == {"format", "ok", "error", "engine", "collections", "crlite_filter_hashes"}, sorted(result)
|
||||
assert result["format"] == 1 and result["ok"] is True and result["error"] is None, result
|
||||
|
||||
@@ -125,11 +125,12 @@ def test_every_test_waits_for_the_release_that_carries_its_property():
|
||||
|
||||
|
||||
def test_the_release_being_made_carries_only_its_own_properties():
|
||||
"""firefox-68 holds the tests of the property it carries (networkidle: the held cut of a committed navigation); no later release has a row until
|
||||
a test waits for it."""
|
||||
"""firefox-68 holds the tests of the property it carries (networkidle: the held cut of a committed navigation); firefox-69 has a row only for the
|
||||
test that waits for it (generate mode does not start Glean); no later release has a row until a test waits for it."""
|
||||
registry = _registry()
|
||||
assert sorted(registry) == ["firefox-68"]
|
||||
assert sorted(registry) == ["firefox-68", "firefox-69"]
|
||||
assert sorted(registry["firefox-68"]["files"]) == ["tests/test_a_page_that_moves_on_e2e.py", "tests/test_fakeweb_p2_e2e.py"]
|
||||
assert sorted(registry["firefox-69"]["files"]) == ["tests/test_security_state_engine_e2e.py"]
|
||||
|
||||
|
||||
def test_a_test_of_the_accumulated_line_gated_on_the_release_being_made_is_named():
|
||||
|
||||
Reference in new issue
Block a user