automation-tests/pkg/machine
Christophe Fergeau 8e56a5605f machine: Fix check which is always true
Before making / mutable/immutable, podman-machine checks if the mount is
being done in /home or /mnt. However the current check is always going
to be true:
```
!strings.HasPrefix(mount.Target, "/home") || !strings.HasPrefix(mount.Target, "/mnt")
```
is false when mount.Target starts with "/home" and mount.Target starts
with "/mnt", which cannot happen at the same time.

The correct check is:
```
!strings.HasPrefix(mount.Target, "/home") && !strings.HasPrefix(mount.Target, "/mnt")
```
which can also be written as:
```
!(strings.HasPrefix(mount.Target, "/home") || strings.HasPrefix(mount.Target, "/mnt"))
```

The impact is not too bad, it results in extra 'chattr -i' calls which
should be unneeded.

[NO NEW TESTS NEEDED]

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2022-07-26 09:12:27 +02:00
..
e2e fix broken machine test 2022-07-21 18:11:53 +02:00
qemu machine: Fix check which is always true 2022-07-26 09:12:27 +02:00
wsl Fixes #14698 Use prepared image for WSL2 machine init 2022-07-13 17:19:38 -05:00
config.go Clean up cached machine images 2022-07-15 09:10:43 -04:00
config_test.go pkg/machine: add missing build tags to tests 2022-07-04 18:09:30 +02:00
connection.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
fcos.go Clean up cached machine images 2022-07-15 09:10:43 -04:00
fedora.go Fix potential leak on mid-stream read error 2022-07-19 14:06:47 -05:00
ignition.go Fix spelling "setup" -> "set up" and similar 2022-06-22 18:39:21 +02:00
ignition_darwin.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
ignition_linux.go Set machine timezone 2021-12-16 12:40:20 -06:00
ignition_schema.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
ignition_windows.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
keys.go Machine init: create .ssh dir if not exist 2022-07-15 15:36:17 -04:00
machine_unsupported.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
pull.go Print rootfs download as a specific version on Win 2022-07-18 10:47:21 -05:00