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