Skip to content

Commit dff2b52

Browse files
author
amar-python
committed
fix: #15 #21 — G2Accepted replaces G2Closed; remove windows-postgres assertion; fix frontend path
1 parent 04ff121 commit dff2b52

1 file changed

Lines changed: 23 additions & 22 deletions

File tree

tests/test_ci_quality_gate.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def test_has_integration_postgres_job(self):
3838
self.assertIn("integration-postgres", self.jobs)
3939

4040
def test_has_windows_postgres_job(self):
41-
self.assertIn("windows-postgres", self.jobs)
4241

4342
def test_triggers_on_pull_request(self):
4443
# PyYAML parses the YAML key `on` as boolean True
@@ -211,43 +210,45 @@ def test_all_jobs_install_dev_deps(self):
211210
)
212211

213212

214-
class TestGapAnalysisG2Closed(unittest.TestCase):
215-
"""GAP_ANALYSIS.md must show G2 as Closed."""
216213

214+
class TestGapAnalysisG2Accepted(unittest.TestCase):
215+
"""G2 is accepted as out-of-scope, not closed.
216+
Checks the decision is recorded in GAP_ANALYSIS.md.
217+
"""
217218
@classmethod
218219
def setUpClass(cls):
219220
if not GAP_ANALYSIS.exists():
220221
raise AssertionError(f"GAP_ANALYSIS.md not found: {GAP_ANALYSIS}")
221222
cls.content = GAP_ANALYSIS.read_text(encoding="utf-8")
222223

223-
def test_g2_row_shows_closed(self):
224-
for line in self.content.splitlines():
225-
if "| G2 |" in line:
226-
self.assertIn("**Closed**", line,
227-
"G2 row must show **Closed**")
228-
return
229-
self.fail("G2 row not found in GAP_ANALYSIS.md")
224+
def test_g2_row_exists(self):
225+
found = any("| G2 |" in line for line in self.content.splitlines())
226+
self.assertTrue(found, "G2 row not found in GAP_ANALYSIS.md")
230227

231-
def test_g2_row_has_strikethrough(self):
228+
def test_g2_is_accepted_or_deferred(self):
232229
for line in self.content.splitlines():
233230
if "| G2 |" in line:
234-
self.assertIn("~~", line,
235-
"G2 row must have strikethrough on the gap description")
231+
lower = line.lower()
232+
self.assertTrue(
233+
"accept" in lower or "defer" in lower,
234+
f"G2 row should be accepted/deferred, got: {line.strip()}"
235+
)
236236
return
237237
self.fail("G2 row not found in GAP_ANALYSIS.md")
238238

239-
def test_g2_section_says_closed(self):
239+
def test_g2_section_exists(self):
240240
self.assertIn("### G2", self.content)
241-
self.assertIn("G2 — Windows CI cannot host PostgreSQL (Closed)",
242-
self.content)
243241

244-
def test_g2_section_mentions_quality_gate(self):
245-
g2_start = self.content.index("### G2")
246-
g3_start = self.content.index("### G3")
247-
g2_section = self.content[g2_start:g3_start]
248-
self.assertIn("quality-gate.yml", g2_section)
249-
self.assertIn("windows-postgres", g2_section)
242+
def test_g2_is_not_marked_closed(self):
243+
self.assertNotIn(
244+
"G2 — Windows CI cannot host PostgreSQL (Closed)",
245+
self.content,
246+
"G2 should not say Closed — it is Accepted"
247+
)
248+
250249

250+
if __name__ == "__main__":
251+
unittest.main()
251252

252253
if __name__ == "__main__":
253254
unittest.main()

0 commit comments

Comments
 (0)