Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand stage unit tests to cover all current stages #1482

Open
supakeen opened this issue Dec 4, 2023 · 0 comments
Open

Expand stage unit tests to cover all current stages #1482

supakeen opened this issue Dec 4, 2023 · 0 comments
Assignees
Labels
good first issue Good for newcomers tests change related to our testing suite

Comments

@supakeen
Copy link
Member

supakeen commented Dec 4, 2023

In #1425 osbuild grew support for stage unit tests. These are quick tests that ensure either files, or subprocess calls are performed with the correct arguments and to test schema validation of these stages.

This has been implemented for a few stages but it would be nice to expand on this. You can run the stage tests with pytest -k stages/test in a source checkout or a specific stage unit test with pytest -k stages/test/test_erofs.py.

Here's a list of stages and if they are currently unit tested. If you're adding unit tests to a stage take a look at what current stage unit tests do or previous pull requests (linked below) and mention in this issue that work on it is ongoing.

  • stages/org.osbuild.anaconda
  • stages/org.osbuild.authconfig
  • stages/org.osbuild.authselect
  • stages/org.osbuild.bootiso.mono
  • stages/org.osbuild.btrfs.subvol
  • stages/org.osbuild.buildstamp
  • stages/org.osbuild.chmod
  • stages/org.osbuild.chown
  • stages/org.osbuild.chrony
  • stages/org.osbuild.clevis.luks-bind
  • stages/org.osbuild.cloud-init
  • stages/org.osbuild.containers.storage.conf
  • stages/org.osbuild.copy
  • stages/org.osbuild.cpio.out
  • stages/org.osbuild.cron.script
  • stages/org.osbuild.crypttab
  • stages/org.osbuild.debug-shell
  • stages/org.osbuild.discinfo
  • stages/org.osbuild.dnf-automatic.config
  • stages/org.osbuild.dnf.config
  • stages/org.osbuild.dnf4.mark
  • stages/org.osbuild.dracut
  • stages/org.osbuild.dracut.conf
  • stages/org.osbuild.erofs -- done in: stages(erofs): add org.osbuild.erofs #1437
  • stages/org.osbuild.error
  • stages/org.osbuild.experimental.ostree.config
  • stages/org.osbuild.fdo
  • stages/org.osbuild.firewall
  • stages/org.osbuild.first-boot
  • stages/org.osbuild.fix-bls
  • stages/org.osbuild.fstab
  • stages/org.osbuild.gcp.guest-agent.conf
  • stages/org.osbuild.greenboot
  • stages/org.osbuild.groups
  • stages/org.osbuild.grub2
  • stages/org.osbuild.grub2.inst
  • stages/org.osbuild.grub2.iso
  • stages/org.osbuild.grub2.legacy
  • stages/org.osbuild.gunzip
  • stages/org.osbuild.gzip -- done in: stages/org.osbuild.gzip: add compression level option #1616
  • stages/org.osbuild.hostname
  • stages/org.osbuild.ignition
  • stages/org.osbuild.implantisomd5
  • stages/org.osbuild.isolinux
  • stages/org.osbuild.kernel-cmdline
  • stages/org.osbuild.kernel-cmdline.bls-append
  • stages/org.osbuild.keymap
  • stages/org.osbuild.kickstart -- done in: stages: add new unit test for kickstart stage #1425
  • stages/org.osbuild.livesys
  • stages/org.osbuild.locale
  • stages/org.osbuild.lorax-script
  • stages/org.osbuild.luks2.format
  • stages/org.osbuild.luks2.remove-key
  • stages/org.osbuild.lvm2.create
  • stages/org.osbuild.lvm2.metadata
  • stages/org.osbuild.machine-id -- done in: stages(machine-id): add a new "machine-id" stage #1452
  • stages/org.osbuild.mkdir
  • stages/org.osbuild.mkfs.btrfs -- done in: Tests: Add unit tests for org.osbuild.mkfs.btrfs stage #1681
  • stages/org.osbuild.mkfs.ext4 -- done in: stages(mkfs.ext4): add basic unit test #1502
  • stages/org.osbuild.mkfs.fat -- done in: Tests: Add unit tests for org.osbuild.mkfs.fat stage #1677
  • stages/org.osbuild.mkfs.xfs -- done in: Tests: Add unit tests for org.osbuild.mkfs.xfs stage #1678
  • stages/org.osbuild.mkinitcpio
  • stages/org.osbuild.modprobe
  • stages/org.osbuild.nginx.conf
  • stages/org.osbuild.nm.conf
  • stages/org.osbuild.nm.conn
  • stages/org.osbuild.noop
  • stages/org.osbuild.oci-archive
  • stages/org.osbuild.oscap.autotailor -- done in: stages(autotailor): add small unit test #1481
  • stages/org.osbuild.oscap.remediation
  • stages/org.osbuild.ostree
  • stages/org.osbuild.ostree.commit
  • stages/org.osbuild.ostree.config
  • stages/org.osbuild.ostree.deploy
  • stages/org.osbuild.ostree.deploy.container
  • stages/org.osbuild.ostree.encapsulate
  • stages/org.osbuild.ostree.fillvar
  • stages/org.osbuild.ostree.genkey
  • stages/org.osbuild.ostree.init
  • stages/org.osbuild.ostree.init-fs
  • stages/org.osbuild.ostree.os-init
  • stages/org.osbuild.ostree.passwd
  • stages/org.osbuild.ostree.post-copy -- done in: stages(ostree.post-copy): add stage unit test and comment #1465
  • stages/org.osbuild.ostree.preptree
  • stages/org.osbuild.ostree.pull
  • stages/org.osbuild.ostree.remotes
  • stages/org.osbuild.ostree.selinux
  • stages/org.osbuild.ostree.sign
  • stages/org.osbuild.ovf
  • stages/org.osbuild.pacman
  • stages/org.osbuild.pacman-keyring
  • stages/org.osbuild.pacman.conf
  • stages/org.osbuild.pacman.mirrorlist.conf
  • stages/org.osbuild.pam.limits.conf
  • stages/org.osbuild.parted
  • stages/org.osbuild.pwquality.conf
  • stages/org.osbuild.qemu
  • stages/org.osbuild.resolv-conf
  • stages/org.osbuild.rhsm
  • stages/org.osbuild.rhsm.facts
  • stages/org.osbuild.rpm
  • stages/org.osbuild.rpm-ostree
  • stages/org.osbuild.rpm.macros
  • stages/org.osbuild.rpmkeys.import
  • stages/org.osbuild.selinux
  • stages/org.osbuild.selinux.config
  • stages/org.osbuild.sfdisk
  • stages/org.osbuild.sgdisk
  • stages/org.osbuild.shell.init
  • stages/org.osbuild.skopeo
  • stages/org.osbuild.squashfs
  • stages/org.osbuild.sshd.config
  • stages/org.osbuild.sysconfig
  • stages/org.osbuild.sysctld
  • stages/org.osbuild.systemd
  • stages/org.osbuild.systemd-journald
  • stages/org.osbuild.systemd-logind
  • stages/org.osbuild.systemd.preset
  • stages/org.osbuild.systemd.unit -- done in: stage/systemd-unit-create: parametrize file location #1620
  • stages/org.osbuild.tar -- done in: stages/org.osbuild.tar: add sparse option #1614
  • stages/org.osbuild.test
  • stages/org.osbuild.timezone
  • stages/org.osbuild.tmpfilesd
  • stages/org.osbuild.truncate
  • stages/org.osbuild.tuned
  • stages/org.osbuild.udev.rules
  • stages/org.osbuild.uki
  • stages/org.osbuild.untar
  • stages/org.osbuild.update-crypto-policies
  • stages/org.osbuild.users -- done in: stages/org.osbuild.users: add expire date #1648
  • stages/org.osbuild.vagrant
  • stages/org.osbuild.waagent.conf
  • stages/org.osbuild.wsl.conf
  • stages/org.osbuild.xorrisofs
  • stages/org.osbuild.xz -- done in: Add tests for org.osbuild.xz and org.osbuild.zstd #1496
  • stages/org.osbuild.yum.config
  • stages/org.osbuild.yum.repos
  • stages/org.osbuild.zipl
  • stages/org.osbuild.zipl.inst
  • stages/org.osbuild.zstd -- done in: Add tests for org.osbuild.xz and org.osbuild.zstd #1496
@supakeen supakeen added good first issue Good for newcomers tests change related to our testing suite labels Dec 4, 2023
@elkoniu elkoniu self-assigned this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tests change related to our testing suite
Projects
None yet
Development

No branches or pull requests

2 participants