mirror of
https://github.com/containers/podman.git
synced 2026-10-22 01:45:09 -04:00
e2e: use ExitCleanly() in cleanup_test.go
Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly() Clean command-line replace. Also, fix up the Containerized and Debian exceptions in matcher. I was in a huge rush Thursday night when I added the Debian exception. This, I hope, makes it slightly easier to understand the cases where we don't check stderr. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
1 parent
adc45ef887
commit
8cb14e54a5
2 files changed
+35
-25
No files matched your search
+19
-10
@@ -198,16 +198,25 @@ func (matcher *exitCleanlyMatcher) Match(actual interface{}) (success bool, err
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// FIXME: #19809, "failed to connect to syslog" warnings on f38
|
||||
// FIXME: so, until that is fixed, don't check stderr if containerized
|
||||
if !Containerized() {
|
||||
info := GetHostDistributionInfo()
|
||||
if info.Distribution == "fedora" {
|
||||
if stderr != "" {
|
||||
matcher.msg = fmt.Sprintf("Unexpected warnings seen on stderr: %q", stderr)
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
// Exit status is 0. Now check for anything on stderr... except:
|
||||
|
||||
if Containerized() {
|
||||
// FIXME: #19809, "failed to connect to syslog" warnings on f38
|
||||
// FIXME: so, until that is fixed, don't check stderr if containerized
|
||||
return true, nil
|
||||
}
|
||||
|
||||
info := GetHostDistributionInfo()
|
||||
if info.Distribution != "fedora" {
|
||||
// runc on debian:
|
||||
// FIXME: #11784 - lstat /sys/fs/.../*.scope: ENOENT
|
||||
// FIXME: #11785 - cannot toggle freezer: cgroups not configured
|
||||
return true, nil
|
||||
}
|
||||
|
||||
if stderr != "" {
|
||||
matcher.msg = fmt.Sprintf("Unexpected warnings seen on stderr: %q", stderr)
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return true, nil
|
||||
|
||||
Reference in new issue
Block a user