Closed famz closed 5 years ago
@famz, I think this is fixed by the results refactoring. Can you check?
Resetting an individual test state is actually broken. In
def clear_and_start_testing(self, obj, test=""):
for k in list(obj.get_properties().keys()):
if k == "testing.done" or \
k == "testing.tested-head":
obj.set_property(k, None)
for r in self.get_testing_results(obj):
r.delete()
self.recalc_pending_tests(obj)
test parameter is not used!
Oops, should be something like
diff --git a/mods/testing.py b/mods/testing.py
index 82b8c80..ccdd336 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -164,8 +164,13 @@ class TestingModule(PatchewModule):
if k == "testing.done" or \
k == "testing.tested-head":
obj.set_property(k, None)
- for r in self.get_testing_results(obj):
- r.delete()
+ if test:
+ r = self.get_testing_result(obj, test)
+ if r:
+ r.delete()
+ else:
+ for r in self.get_testing_results(obj):
+ r.delete()
self.recalc_pending_tests(obj)
def www_view_testing_reset(self, request, project_or_series):
(totally untested).
Yeah, I'll write a test for it.
Fixed now. The issue mentioned in the comments was fixed in commit d2576e8acc640ec79149d93fe8a7184a75cef876.
When admin/maintainer click the
Reset testing states of '...'
button, resulting in all failed tests restarted, the overall testing failed state (represented by the red "T" flag) should be reset too.