Skip to content

Commit

Permalink
Add some image artefacts to seed script
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Jan 15, 2025
1 parent 25bd3e5 commit 9b59226
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
46 changes: 46 additions & 0 deletions backend/scripts/seed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
EndTestExecutionRequest,
StartCharmTestExecutionRequest,
StartDebTestExecutionRequest,
StartImageTestExecutionRequest,
StartSnapTestExecutionRequest,
)
from test_observer.data_access.models import Artefact
Expand Down Expand Up @@ -265,6 +266,51 @@
ci_link="http://example13",
test_plan="com.canonical.solutions-qa::tbd",
),
StartImageTestExecutionRequest(
name="noble-live-desktop-amd64",
os="ubuntu",
release="noble",
arch="amd64",
version="20240827",
sha256="e71fb5681e63330445eec6fc3fe043f365289c2e595e3ceeac08fbeccfb9a957",
owner="foundations",
image_url=HttpUrl(
"https://cdimage.ubuntu.com/noble/daily-live/20240827/noble-desktop-amd64.iso"
),
execution_stage=StageName.pending,
test_plan="image test plan",
environment="xps",
),
StartImageTestExecutionRequest(
name="noble-live-desktop-amd64",
os="ubuntu",
release="noble",
arch="amd64",
version="20240827",
sha256="e71fb5681e63330445eec6fc3fe043f365289c2e595e3ceeac08fbeccfb9a957",
owner="foundations",
image_url=HttpUrl(
"https://cdimage.ubuntu.com/noble/daily-live/20240827/noble-desktop-amd64.iso"
),
execution_stage=StageName.pending,
test_plan="desktop image test plan",
environment="xps",
),
StartImageTestExecutionRequest(
name="ubuntu-core-20-arm64-raspi",
os="ubuntu-core",
release="20",
arch="amd64+raspi",
version="20221025.4",
sha256="e94418aa109cf5886a50e828e98ac68361ea7e3ca1ab4aed2bbddc0a299b334f",
owner="snapd",
image_url=HttpUrl(
"https://cdimage.ubuntu.com/ubuntu-core/20/stable/20221025.4/ubuntu-core-20-arm64+raspi.img.xz"
),
execution_stage=StageName.pending,
test_plan="core image test plan",
environment="rpi3",
),
]

END_TEST_EXECUTION_REQUESTS = [
Expand Down
6 changes: 4 additions & 2 deletions backend/test_observer/controllers/test_executions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class StartCharmTestExecutionRequest(_StartTestExecutionRequest):


class StartImageTestExecutionRequest(_StartTestExecutionRequest):
family: Literal[FamilyName.image]
family: Literal[FamilyName.image] = FamilyName.image
execution_stage: Literal[StageName.pending, StageName.current]
os: str
release: str
Expand Down Expand Up @@ -167,7 +167,9 @@ class RerunRequest(BaseModel):

class PendingRerun(BaseModel):
test_execution_id: int
ci_link: str = Field(validation_alias=AliasPath("test_execution", "ci_link"))
ci_link: str | None = Field(
validation_alias=AliasPath("test_execution", "ci_link"), default=None
)
family: FamilyName = Field(
validation_alias=AliasPath(
"test_execution", "artefact_build", "artefact", "family"
Expand Down

0 comments on commit 9b59226

Please sign in to comment.