fix TestPidListerFailure on cgroupsv2

This commit is contained in:
Benjamin Elder 2021-02-10 00:15:12 -08:00
parent 071bdc344e
commit 0156eb179e

View File

@ -19,6 +19,8 @@ limitations under the License.
package oom
import (
"os"
"github.com/opencontainers/runc/libcontainer/cgroups"
"testing"
@ -100,5 +102,5 @@ func TestOOMScoreAdjContainer(t *testing.T) {
func TestPidListerFailure(t *testing.T) {
_, err := getPids("/does/not/exist")
assert.True(t, cgroups.IsNotFound(err), "expected getPids to return not exists error. Got %v", err)
assert.True(t, cgroups.IsNotFound(err) || os.IsNotExist(err), "expected getPids to return not exists error. Got %v", err)
}