Skip to content

Commit

Permalink
Bring back review fields on TestExecution ORM
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Oct 16, 2024
1 parent 52f5e72 commit f984874
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/test_observer/data_access/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from test_observer.data_access.models_enums import (
ArtefactBuildEnvironmentReviewDecision,
ArtefactStatus,
TestExecutionReviewDecision,
TestExecutionStatus,
TestResultStatus,
)
Expand Down Expand Up @@ -353,6 +354,11 @@ class TestExecution(Base):
status: Mapped[TestExecutionStatus] = mapped_column(
default=TestExecutionStatus.NOT_STARTED
)
review_decision: Mapped[list[TestExecutionReviewDecision]] = mapped_column(
ARRAY(Enum(TestExecutionReviewDecision)),
default=[],
)
review_comment: Mapped[str] = mapped_column(default="")

checkbox_version: Mapped[str | None] = mapped_column(
String(200), nullable=True, default=None
Expand Down
11 changes: 11 additions & 0 deletions backend/test_observer/data_access/models_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ class ArtefactBuildEnvironmentReviewDecision(str, Enum):
APPROVED_ALL_TESTS_PASS = "APPROVED_ALL_TESTS_PASS"


class TestExecutionReviewDecision(str, Enum):
__test__ = False

REJECTED = "REJECTED"
APPROVED_INCONSISTENT_TEST = "APPROVED_INCONSISTENT_TEST"
APPROVED_UNSTABLE_PHYSICAL_INFRA = "APPROVED_UNSTABLE_PHYSICAL_INFRA"
APPROVED_CUSTOMER_PREREQUISITE_FAIL = "APPROVED_CUSTOMER_PREREQUISITE_FAIL"
APPROVED_FAULTY_HARDWARE = "APPROVED_FAULTY_HARDWARE"
APPROVED_ALL_TESTS_PASS = "APPROVED_ALL_TESTS_PASS"


class ArtefactStatus(str, Enum):
APPROVED = "APPROVED"
MARKED_AS_FAILED = "MARKED_AS_FAILED"
Expand Down

0 comments on commit f984874

Please sign in to comment.