"""Default VM configuration (memory in MB, vCPUs, root disk size in GB, /var disk size in GB)."""
"""Default VM configuration (memory in MB, vCPUs, root disk size in GB, /var disk size in GB)."""
return(4096,2,50,100)# (memory in MB, vCPUs, disk size for / and /var in GB)
return(4096,2,50,100)# (memory in MB, vCPUs, disk size for / and /var in GB)
# PostgreSQL VM are kept for the duration of a test module, backed with a persistent Virtiofs directory.
@pytest.fixture(scope="module")
defdns_names()->list[str]:
"""List of DNS names to be resolved by the VM (e.g. for ACME challenges)."""
return[]
# Test VM are kept for the duration of a test module, backed with a persistent Virtiofs directory.
@pytest.fixture(scope="module")
@pytest.fixture(scope="module")
deffcos_vm(
deffcos_vm(
request,# Fixture that provides information about the requesting test function, class or module.
request,# Fixture that provides information about the requesting test function, class or module.
keep_vm:bool,# Fixture passed from command line option --keep-vm to determine whether to keep the VM after tests for debugging purposes.
keep:bool,# Fixture passed from command line option --keep to determine whether to keep the VM after tests for debugging purposes.
fcos_vm_config:tuple[int,int,int,int],# Fixture that provides the VM configuration (memory in MB, vCPUs, root disk size in GB, /var disk size in GB).
fcos_vm_config:tuple[int,int,int,int],# Fixture that provides the VM configuration (memory in MB, vCPUs, root disk size in GB, /var disk size in GB).
test_ssh_key:Path,# Fixture that provides the path to the SSH private key to connect to the VM.
test_ssh_key:Path,# Fixture that provides the path to the SSH private key to connect to the VM.
test_ssh_pubkey:str,# Fixture that provides the content of the SSH public key to inject into the VM for SSH access.
test_ssh_pubkey:str,# Fixture that provides the content of the SSH public key to inject into the VM for SSH access.
virtiofs_dirs:list[tuple[Path,str]],# Fixture that provides a list of tuples containing host directories and their corresponding target directories in the VM to be exposed via VirtioFS.
virtiofs_dirs:list[tuple[Path,str]],# Fixture that provides a list of tuples containing host directories and their corresponding target directories in the VM to be exposed via VirtioFS.
tmp_path_factory:pytest.TempPathFactory,# Fixture that provides a factory for creating temporary directories.
tmp_path_factory:pytest.TempPathFactory,# Fixture that provides a factory for creating temporary directories.
fcos_extra_files:dict,# Fixture that provides extra files to inject into the FCOS VM image (overridable per module).
dns_server:DNSServer,# Fixture that provides a DNS server manager to configure DNS entries for the test VMs.
dns_names:list[str],# Fixture that provides a list of DNS names to be resolved by the VM (e.g. for ACME challenges)
# List here the names of other projects (directories at the top-level) that this project depends on.
# List here the names of other projects (directories at the top-level) that this project depends on.
@ -120,10 +128,10 @@ I_KNOW_WHAT_I_AM_DOING ?=
# List of all ignition files corresponding to the dependencies
# List of all ignition files corresponding to the dependencies
# Here, we inject the "base" project as a dependency. It can therefore be assumed to always be embeddable in project's butane specs.
# Here, we inject the "base" project as a dependency. It can therefore be assumed to always be embeddable in project's butane specs.
DEPENDENCIES_IGNITION_FILES:=$(shell for dep in $$(if["$(PROJECT_NAME)" !="base"];thenecho base;fi)$(DEPENDENCIES);doecho$(COOKBOOKS_DIR)/$$dep/$$dep.ign;done)
DEPENDENCIES_IGNITION_FILES:=$(shell for dep in $$(if["$(PROJECT_NAME)" !="base"];thenecho base;fi)$(DEPENDENCIES);doecho$(COOKBOOKS_DIR)/$$dep/build/$$dep.ign;done)
# Variation of the previous variable with the built-in examples.
# Variation of the previous variable with the built-in examples.
DEPENDENCIES_IGNITION_EXAMPLES_FILES:=$(shell for dep in $$(if["$(PROJECT_NAME)" !="base"];thenecho base;fi)$(DEPENDENCIES);doecho$(COOKBOOKS_DIR)/$$dep/$$dep.ign $(COOKBOOKS_DIR)/$$dep/$$dep-examples.ign;done)
DEPENDENCIES_IGNITION_EXAMPLES_FILES:=$(shell for dep in $$(if["$(PROJECT_NAME)" !="base"];thenecho base;fi)$(DEPENDENCIES);doecho$(COOKBOOKS_DIR)/$$dep/build/$$dep.ign $(COOKBOOKS_DIR)/$$dep/build/$$dep-examples.ign;done)
# User and group IDs to own the project files and directories.
# User and group IDs to own the project files and directories.
# Generate the final Fedora CoreOS ignition files (dev & test) by merging the Butane spec with the local and project-specific ignition files, as well as those of the dependencies.
# Generate the final Fedora CoreOS ignition files (dev & test) by merging the Butane spec with the local and project-specific ignition files, as well as those of the dependencies.