test: adapt tests new crun error messages

Needed-by: https://github.com/containers/crun/pull/1672

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2025-02-17 09:12:31 +01:00
parent 35d2a65e3a
commit c65bb903b6
6 changed files with 39 additions and 18 deletions

View File

@ -46,6 +46,7 @@ func ExitCode(err error) int {
e := strings.ToLower(err.Error())
logrus.Debugf("ExitCode msg: %q", e)
if strings.Contains(e, "not found") ||
strings.Contains(e, "executable path is empty") ||
strings.Contains(e, "no such file") {
return ExecErrorCodeNotFound
}