Project

General

Profile

Wiki » History » Revision 6

Revision 5 (jlausuch, 2022-09-05 14:34) → Revision 6/10 (jlausuch, 2022-09-08 08:23)

## SLE Micro Test Cases 

 ### Basic checks 
 #### microos/networking.pm 
 Basic network and connectivity check.  
 - Print network configuration (ip addr show and resolv.conf) 
 - Ping localhost `127.0.0.1` (IPv4) and `::1` (IPv6) 
 - Curl to openqa.opensuse.org and github.com 

 #### microos/libzypp_config.pm 
 Check that zypper configuration is customized for MicroOS. 
 - `egrep -x "^solver.onlyRequires ?= ?true" /etc/zypp/zypp.conf` 
 - `egrep -x "^rpm.install.excludedocs ?= ?yes" /etc/zypp/zypp.conf` 
 - `egrep -x "^multiversion ?=" /etc/zypp/zypp.conf` 

 #### microos/image_checks.pm 
 Simple image specific checks: 
 - Verify that openQA resized the disk image 
 - Verify that there is no unpartitioned space left 
 - Verify that the filesystem mounted at /var grew beyond the default 5GiB 
 - Verify that combustion ran 

 #### microos/one_line_checks.pm 
 Simple checks after installation. 
 - Check that snapper is configured `snapper list` 
 - Subvolume check `btrfs subvolume show /var` 
 - `kubectl` is not installable if `SYSTEM_ROLE=microos` (only openSUSE MicroOS) 
 - `crio` should be installed if `SYSTEM_ROLE=kubeadm` (only openSUSE MicroOS) 


 #### microos/services_enabled.pm 
 Check that services are enables based on system role 
 The following services should be enabled by default: 
 - `issue-add-ssh-keys` 
 - `issue-generator` 
 - `transactional-update.timer` 
 - `sshd` 

 On other system roles (MicroOS only), other services might be checked to be enabled. 


 #### microos/cockpit_service.pm 
 Basic check for cockpit service. 
 - Install `cockpit` package if not installed 
 - Install `cockpit-networkmanager` package if the system is running network-manager. 
 - Install `cockpit-wicked` package if the system is running wicked. 
 - Install `cockpit-machines` and `cockpit-tukit` if packages are available. 
 - Enable and start `cockpit.socket service` and check that Cockpit is active and accessible on http://localhost:9090 
 - Test Cockpit service survives a reboot (it's active automatically after rebooting) 



 ### Specific transactional system tests 

 

 #### transactional/trup_smoke.pm 
 Basic smoke test to verify all basic transactional update operations work and system can properly boot. 
 - Reinstall bootloader: `transactional-update bootloader` 
 - Regenerate grub.cfg: `transactional-update grub.cfg` 
 - Regenerate initrd: `transactional-update initrd` 
 - Regenerate kdump: `transactional-update kdump` 
 - Run cleanup: `transactional-update cleanup` 


 


 #### transactional/filesystem_ro.pm 
 Check that root filesystem is read only 
 - `/` is RO:  
   - cannot create `touch /should_fail` 
   - `btrfs property get / ro | grep "ro=true"` 
 - `/var` is RW: 
   - can create `touch /var/log/should_succeed` 
   - `btrfs property get /var ro | grep "ro=false"` 
 - `/etc` is RW: 
   - can create `touch /etc/should_succeed` 
 - Look for ro mount point in fstab: `findmnt -s / -n -O ro` 
 - Look for ro mount point in mounted filesystems: `findmnt / -n -O ro` 

 #### transactional/transactional_update.pm 
 TBD 

 #### transactional/rebootmgr.pm 
 Test rebootmgr using different strategies 
 - Test instant reboot 
 - Test maint-window strategy 
 - Test etcd locking strategy 


 TBD 

 #### transactional/health_check.pm 
 Check that health-check service works correctly. 
 - Install and enable service `health-checker` if not installed. 
 - `health-checker` command shall return `passed` string. 
 - Current snapshot shall be the same as the logged one from health-checker. 
 - Update rebootmgr.sh using transactional update shell to force health-checker to fail: 
   - f=$(rpm --eval %{_libexecdir})/health-checker/fail.sh; echo -e \'#/bin/sh\n[ "$1" != "check" ]\' > $f && chmod a+x $f 
   - reboot 
   - health-checker should rollback to the correct snapshot 
 - `health-checker` command shall return `passed` string.