Skip to content
Open
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
60 changes: 60 additions & 0 deletions jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,65 @@ class JobData(TypedDict):
name_filter: NotRequired[str]

JOBS: dict[str, JobData] = {
"postinstall": {
"description":
"Minimal set of tests to run after an installation or an upgrade.",
"requirements": [
"A pool master with a local SR. Can be a single-host pool.",
"A VM (small and fast-booting).",
],
"nb_pools": 1,
"params": {
"--vm": "single/small_vm",
},
"paths": [
"tests/xapi/firstboot",
"tests/xo/test_xo_connection.py",
"tests/misc",
"tests/system",
],
"markers": "not hostA2 and (small_vm or no_vm) and not reboot and not complex_prerequisites and not sr_disk",
},
"postinstall-intrapool-migrate": {
"description":
"Minimal intra-pool live-migrate tests to run after an installation or an upgrade.",
"requirements": [
"A pool with at least 2 hosts and a shared SR in addition to local SRs on hosts. The shared SR is the "
"default SR of the pool.",
"A VM (small and fast-booting).",
],
"nb_pools": 1,
"params": {
"--vm": "single/small_vm",
},
"paths": [
"tests/misc/test_basic_without_ssh.py::TestBasicNoSSH::test_live_migrate",
],
},
"postinstall-with-tls": {
"description":
"Minimal set of tests to run after an installation or an upgrade, and after enabling TLS verification in "
"the case of an upgrade. Includes a pool join test.",
"requirements": [
"A pool with at least 2 hosts.",
"(If the pool has only one host, you can add `-m 'not hostA2'` parameter but this will skip the TLS "
"verification test.)",
"A second one-host pool, without any shared storage, which will be temporarily joined to the first pool.",
"(If you can't provide a second pool, which is too bad because this skips pool join tests, add "
"`-m 'not hostB1'`, and specify the pool master of the first pool twice.)",
"TLS verification enabled on both pools.",
"A VM (small and fast-booting).",
],
"nb_pools": 2,
"params": {
"--vm": "single/small_vm",
},
"paths": [
"tests/xapi/tls_verification",
# because we want to test a pool join

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# because we want to test a pool join
# because we want to test joining a pool.

"tests/uefi_sb/test_varstored_cert_flow.py::TestPoolToDiskCertInheritanceOnPoolJoin",
],
},
"main": {
"description": "a group of not-too-long tests that run either without a VM, or with a single small one",
"requirements": [
Expand All @@ -28,6 +87,7 @@ class JobData(TypedDict):
"An additional free disk on the first host.",
"Config in data.py for another NFS SR.",
"A VM (small and fast-booting).",
"On XCP-ng 8.3+: TLS verification must be enabled.",
],
"nb_pools": 2,
"params": {
Expand Down
Empty file.
20 changes: 20 additions & 0 deletions tests/xapi/firstboot/test_firstboot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os

# Requirements:
# From --hosts parameter:
# - A XCP-ng >= 8.2 host

FIRSTBOOT_FILES = [
'ran-control-domain-params-init',
'ran-create-guest-templates',
'ran-generate-iscsi-iqn',
'ran-network-init',
'ran-storage-init',
]

FIRSTBOOT_DIR = '/var/lib/misc'

def test_firstboot_ran(host):
for name in FIRSTBOOT_FILES:
filepath = os.path.join(FIRSTBOOT_DIR, name)
assert host.file_exists(filepath)