Transactional Update tests » History » Version 2
jlausuch, 2022-09-22 13:45
1 | 2 | jlausuch | |
---|---|---|---|
2 | ### Basic checks |
||
3 | #### microos/networking.pm |
||
4 | Basic network and connectivity check. |
||
5 | - Print network configuration (ip addr show and resolv.conf) |
||
6 | - Ping localhost `127.0.0.1` (IPv4) and `::1` (IPv6) |
||
7 | - Curl to openqa.opensuse.org and github.com |
||
8 | |||
9 | #### microos/libzypp_config.pm |
||
10 | Check that zypper configuration is customized for MicroOS. |
||
11 | - `egrep -x "^solver.onlyRequires ?= ?true" /etc/zypp/zypp.conf` |
||
12 | - `egrep -x "^rpm.install.excludedocs ?= ?yes" /etc/zypp/zypp.conf` |
||
13 | - `egrep -x "^multiversion ?=" /etc/zypp/zypp.conf` |
||
14 | |||
15 | #### microos/image_checks.pm |
||
16 | Simple image specific checks: |
||
17 | - Verify that openQA resized the disk image |
||
18 | - Verify that there is no unpartitioned space left |
||
19 | - Verify that the filesystem mounted at /var grew beyond the default 5GiB |
||
20 | - Verify that combustion ran |
||
21 | |||
22 | #### microos/one_line_checks.pm |
||
23 | Simple checks after installation. |
||
24 | - Check that snapper is configured `snapper list` |
||
25 | - Subvolume check `btrfs subvolume show /var` |
||
26 | - `kubectl` is not installable if `SYSTEM_ROLE=microos` (only openSUSE MicroOS) |
||
27 | - `crio` should be installed if `SYSTEM_ROLE=kubeadm` (only openSUSE MicroOS) |
||
28 | |||
29 | |||
30 | #### microos/services_enabled.pm |
||
31 | Check that services are enables based on system role |
||
32 | The following services should be enabled by default: |
||
33 | - `issue-add-ssh-keys` |
||
34 | - `issue-generator` |
||
35 | - `transactional-update.timer` |
||
36 | - `sshd` |
||
37 | |||
38 | On other system roles (MicroOS only), other services might be checked to be enabled. |
||
39 | |||
40 | |||
41 | #### microos/cockpit_service.pm |
||
42 | Basic check for cockpit service. |
||
43 | - Install `cockpit` package if not installed |
||
44 | - Install `cockpit-networkmanager` package if the system is running network-manager. |
||
45 | - Install `cockpit-wicked` package if the system is running wicked. |
||
46 | - Install `cockpit-machines` and `cockpit-tukit` if packages are available. |
||
47 | - Enable and start `cockpit.socket service` and check that Cockpit is active and accessible on http://localhost:9090 |
||
48 | - Test Cockpit service survives a reboot (it's active automatically after rebooting) |
||
49 | |||
50 | |||
51 | |||
52 | ### Specific transactional system tests |
||
53 | |||
54 | #### transactional/trup_smoke.pm |
||
55 | Basic smoke test to verify all basic transactional update operations work and system can properly boot. |
||
56 | - Reinstall bootloader: `transactional-update bootloader` |
||
57 | - Regenerate grub.cfg: `transactional-update grub.cfg` |
||
58 | - Regenerate initrd: `transactional-update initrd` |
||
59 | - Regenerate kdump: `transactional-update kdump` |
||
60 | - Run cleanup: `transactional-update cleanup` |
||
61 | |||
62 | |||
63 | #### transactional/filesystem_ro.pm |
||
64 | Check that root filesystem is read only |
||
65 | - `/` is RO: |
||
66 | - cannot create `touch /should_fail` |
||
67 | - `btrfs property get / ro | grep "ro=true"` |
||
68 | - `/var` is RW: |
||
69 | - can create `touch /var/log/should_succeed` |
||
70 | - `btrfs property get /var ro | grep "ro=false"` |
||
71 | - `/etc` is RW: |
||
72 | - can create `touch /etc/should_succeed` |
||
73 | - Look for ro mount point in fstab: `findmnt -s / -n -O ro` |
||
74 | - Look for ro mount point in mounted filesystems: `findmnt / -n -O ro` |
||
75 | |||
76 | #### transactional/transactional_update.pm |
||
77 | TBD |
||
78 | |||
79 | #### transactional/rebootmgr.pm |
||
80 | Test rebootmgr using different strategies |
||
81 | - Test instant reboot |
||
82 | - Test maint-window strategy |
||
83 | - Test etcd locking strategy |
||
84 | |||
85 | |||
86 | #### transactional/health_check.pm |
||
87 | Check that health-check service works correctly. |
||
88 | - Install and enable service `health-checker` if not installed. |
||
89 | - `health-checker` command shall return `passed` string. |
||
90 | - Current snapshot shall be the same as the logged one from health-checker. |
||
91 | - Update rebootmgr.sh using transactional update shell to force health-checker to fail: |
||
92 | - f=$(rpm --eval %{_libexecdir})/health-checker/fail.sh; echo -e \'#/bin/sh\n[ "$1" != "check" ]\' > $f && chmod a+x $f |
||
93 | - reboot |
||
94 | - health-checker should rollback to the correct snapshot |
||
95 | - `health-checker` command shall return `passed` string. |