Skip to content

Commit f1ff78a

Browse files
integration tests: sync suite between GHA and entrypoint (#12703)
* integration tests: sync suite between GHA and entrypoint * fix Path object issue from Ruff * skip false positive history test that doesn't align with logic
1 parent 40601d5 commit f1ff78a

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

.github/workflows/integration-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ jobs:
3131
"tests/search_test.py",
3232
"tests/file_test.py",
3333
"tests/dedupe_test.py",
34+
"tests/announcement_banner_test.py",
35+
"tests/close_old_findings_dedupe_test.py",
36+
"tests/close_old_findings_test.py",
37+
"tests/false_positive_history_test.py",
3438
"tests/check_various_pages.py",
39+
# "tests/import_scanner_test.py",
40+
# "tests/zap.py",
3541
"tests/notifications_test.py",
3642
"tests/tool_config.py",
3743
"openapi-validatator",
44+
3845
]
3946
os: [alpine, debian]
4047
fail-fast: false

docker/entrypoint-integration-tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ else
288288
# echo "Error: Zap integration test failed"; exit 1
289289
# fi
290290

291+
test="Notifications tests"
292+
echo "Running: $test"
293+
if python3 tests/notifications_test.py ; then
294+
success "$test"
295+
else
296+
fail "$test"
297+
fi
298+
291299
test="Tool Config integration tests"
292300
echo "Running: $test"
293301
if python3 tests/tool_config.py ; then

tests/close_old_findings_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_close_same_engagement_tests(self):
132132
scan_environment = Select(driver.find_element(By.ID, "id_environment"))
133133
scan_environment.select_by_visible_text("Development")
134134
driver.find_element(By.ID, "id_close_old_findings").click()
135-
driver.find_element(By.ID, "id_file").send_keys(self.relative_path / "dedupe_scans/dedupe_and_close_1.xml")
135+
driver.find_element(By.ID, "id_file").send_keys(str(self.relative_path / "dedupe_scans/dedupe_and_close_1.xml"))
136136
driver.find_elements(By.CLASS_NAME, "btn-primary")[1].click()
137137

138138
self.assertTrue(self.is_success_message_present(text="1 findings and closed 3 findings"))

tests/false_positive_history_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def test_retroactive_edit_finding(self):
119119
self.assert_is_false_positive(finding_1)
120120
self.assert_is_false_positive(finding_2)
121121
# Reactivate second finding
122+
# PROBLEM: Upon saving of finding_2 it will be maked a false positive againm that's why this test case is skipped for now
123+
# https://github.com/DefectDojo/django-DefectDojo/issues/8977
122124
self.edit_toggle_false_positive(finding_2)
123125
# Assert that both findings are active again
124126
self.assert_is_active(finding_1)
@@ -163,7 +165,9 @@ def suite():
163165
# Add each test the the suite to be run
164166
# success and failure is output by the test
165167
suite.addTest(ProductTest("test_create_product"))
166-
suite.addTest(FalsePositiveHistoryTest("test_retroactive_edit_finding"))
168+
# SKIP this test as the implemented logic will always mark finding1 and finding2 as false positive as long as at least one of them is false positive
169+
# https://github.com/DefectDojo/django-DefectDojo/issues/8977
170+
# suite.addTest(FalsePositiveHistoryTest("test_retroactive_edit_finding"))
167171
suite.addTest(ProductTest("test_create_product"))
168172
suite.addTest(FalsePositiveHistoryTest("test_retroactive_bulk_edit_finding"))
169173
suite.addTest(ProductTest("test_delete_product"))

0 commit comments

Comments
 (0)