test_the_azure_template_pushes_the_ado_flavour_to_a_code_wiki

Tests › tests/test_hosting.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE JOB'S OWN TOKEN, NEVER PRINTED: it reaches git through an extra header, not a URL that would land in the log.

Verifies REQ-DDB-WIKI-039

Given

  1. text = (REPO / "templates" / "azure-pipelines-wiki.yml").read_text()
  2. doc = yaml.safe_load(text)
  3. params = {p["name"]: p for p in doc["parameters"]}
→

When

  1. —
→

Then

  1. ✓ params["clewVersion"]["default"] equals _version()
  2. ✓ {"wikiRepository", "wikiBranch"} is at most set(params)
  3. ✓ text contains "--format markdown --flavor ado"
  4. ✓ text contains "System.AccessToken"
  5. ✓ text contains "http.extraheader"
  6. ✓ re.search(r"https://[^\s]*\$\(System\.AccessToken\)", text) is false

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

Build this wiki from the index · 1 of 400 steps

… 96 earlier steps

callercallercallercallerother filesother filesother filesother filesloop (line 223)looploop (line 224)looploop (line 74)looploop (line 78)loopbuild_wiki97–98. console_scripts → _read_toml97_read_toml +1 more99. require_toml_module → toml_module99toml_module▶ test enters100. console_scripts → _nested100_nested101. _scripts → _defined101_defined

… 299 later steps

1 more

tests/test_hosting.py:81 · its file's page

What it checks (5)

  1. assert params["clewVersion"]["default"] == _version() observes _version
  2. assert {"wikiRepository", "wikiBranch"} <= set(params) not attributed
  3. assert "--format markdown --flavor ado" in text not attributed
  4. assert "System.AccessToken" in text and "http.extraheader" in text not attributed
  5. assert not re.search(r"https://[^\s]*\$\(System\.AccessToken\)", text) not attributed

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_the_azure_template_pushes_the_ado_flavour_to_a_code_wiki→_version

What it reaches

Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-039catalogunknown