clew
  • Requirements
  • Flows
  • Tests
  • Change impact
  • Map
  • Architecture
  • Docs
  • SBOM

test_issue_links_follow_the_declared_or_remote_tracker¶

Tests › tests/test_wiki_site.py

passed Passed in the packaged run.

What this test is for

Why it exists

GITHUB AND AZURE DEVOPS, prefilled; the tracker is declared (`wiki.issues`) or read from the `origin` remote; an unknown host gives no link rather than a guessed one.

Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-020 REQ-DDB-WIKI-021 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052

Given

  1. —
→

When

  1. target_from_remote("git@github.com:acme/demo.git")
  2. target_from_remote("https://github.com/acme/demo")
  3. target_from_remote("https://dev.azure.com/org/proj/_git/repo")
5 more
  1. target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo")
  2. target_from_remote("https://gitlab.example/x/y.git")
  3. url = issue_url(("ado", "org/proj"), "REQ-1", "Title", "Body")
  4. parts = urlsplit(url)
  5. query = parse_qs(parts.query)
→

Then

  1. ✓ target_from_remote("git@github.com:acme/demo.git") equals ("github", "acme/demo")
  2. ✓ target_from_remote("https://github.com/acme/demo") equals ("github", "acme/demo")
  3. ✓ target_from_remote("https://dev.azure.com/org/proj/_git/repo") equals ("ado", "org/proj")
  4. ✓ target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo") equals ("ado", "org/proj")
  5. ✓ target_from_remote("https://gitlab.example/x/y.git") is None
  6. ✓ parts.netloc equals "dev.azure.com"
  7. ✓ parts.path equals "/org/proj/_workitems/create/Issue"
  8. ✓ query["[System.Tags]"] equals ["req:REQ-1"]
  9. ✓ query["[System.Title]"][0] contains "REQ-1"

tests/test_wiki_site.py:769 · its file's page

What it checks (7)

  1. assert target_from_remote("git@github.com:acme/demo.git") == ("github", "acme/demo") observes target_from_remote
  2. assert target_from_remote("https://github.com/acme/demo") == ("github", "acme/demo") observes target_from_remote
  3. assert target_from_remote("https://dev.azure.com/org/proj/_git/repo") == ("ado", "org/proj") observes target_from_remote
  4. assert target_from_remote("git@ssh.dev.azure.com:v3/org/proj/repo") == ("ado", "org/proj") observes target_from_remote
  5. assert target_from_remote("https://gitlab.example/x/y.git") is None observes target_from_remote
  6. assert parts.netloc == "dev.azure.com" and parts.path == "/org/proj/_workitems/create/Issue" not attributed
  7. assert query["[System.Tags]"] == ["req:REQ-1"] and "REQ-1" in query["[System.Title]"][0] 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_issue_links_follow_the_declared_or_remote_tracker→target_from_remote→issue_url

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.

test_issue_links_follow_the_declared_or_remote_tracker · 7 checkstarget_from_remoteREQ-DDB-WIKI-022 · measured

Requirements it verifies (14)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-011catalogunknown
REQ-DDB-WIKI-012catalogunknown
REQ-DDB-WIKI-013catalogunknown
REQ-DDB-WIKI-014catalogunknown
REQ-DDB-WIKI-015catalogunknown
REQ-DDB-WIKI-018catalogunknown
REQ-DDB-WIKI-020catalogunknown
REQ-DDB-WIKI-021catalogunknown
REQ-DDB-WIKI-023catalogunknown
REQ-DDB-WIKI-025catalogunknown
REQ-DDB-WIKI-031catalogunknown
REQ-DDB-WIKI-044catalogunknown
REQ-DDB-WIKI-050catalogunknown
REQ-DDB-WIKI-052catalogunknown
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.

  • REQ-DDB-WIKI-022 measured
clew Generated by clew wiki from the repository's index