Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/python/src/common/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def add_test_result(self, result):
# Just update the result and description
test_result.result = result.result
test_result.description = result.description
test_result.recommendations = result.recommendations
updated = True

if not updated:
Expand Down
18 changes: 16 additions & 2 deletions framework/python/src/test_orc/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Provides high level management of the test orchestrator."""
import copy
import os
import json
import re
Expand Down Expand Up @@ -306,8 +307,15 @@ def _run_test_module(self, module):

# Get all tests to be executed and set to in progress
for test in module.tests:
test.result = "In Progress"
self.get_session().add_test_result(test)

test_copy = copy.deepcopy(test)
test_copy.result = "In Progress"

# We don't want steps to resolve for in progress tests
if hasattr(test_copy, "recommendations"):
test_copy.recommendations = None

self.get_session().add_test_result(test_copy)

try:

Expand Down Expand Up @@ -430,6 +438,12 @@ def _run_test_module(self, module):
result=test_result["result"])
test_case.result=test_result["result"]

if (test_case.result == "Non-Compliant" and
"recommendations" in test_result):
test_case.recommendations = test_result["recommendations"]
else:
test_case.recommendations = None

self._session.add_test_result(test_case)

except (FileNotFoundError, PermissionError,
Expand Down