forked from Mirror/pmbootstrap
We have decided to let the user generate a pmbootstrap_v3.cfg file instead of attempting to automatically migrate the file. This way we don't need to worry about potential migration bugs and users can also temporarily go back to v2 to compare behavior with v3 without problems. Remove migration logic related to mirror_alpine and mirrors_postmarketos, before I add support for using multiple repositories with these again (as needed for bpo). This reduces complexity and removes a note about "multiple mirrors are not supported" that won't be valid anymore.
25 lines
885 B
Python
25 lines
885 B
Python
import pmb.config
|
|
from pmb.core.config import SystemdConfig
|
|
|
|
"""Test the config file serialization and deserialization."""
|
|
|
|
|
|
def test_load(config_file):
|
|
config = pmb.config.load(config_file)
|
|
assert config.build_default_device_arch
|
|
assert config.ccache_size == "5G"
|
|
assert config.device == "qemu-amd64"
|
|
assert config.extra_packages == "neofetch,neovim,reboot-mode"
|
|
assert config.hostname == "qemu-amd64"
|
|
assert not config.is_default_channel
|
|
assert config.jobs == "8"
|
|
assert config.kernel == "edge"
|
|
assert config.locale == "C.UTF-8"
|
|
assert config.ssh_keys
|
|
assert config.sudo_timer
|
|
assert config.systemd == SystemdConfig.ALWAYS
|
|
assert config.timezone == "Europe/Berlin"
|
|
assert config.ui == "gnome"
|
|
assert config.providers == {}
|
|
assert config.mirrors["pmaports"] is not None
|
|
assert ".pytest_tmp" in config.work.parts
|