Skip to content

Commit

Permalink
Merge pull request #98960 from BenTheElder/oom-test-v2
Browse files Browse the repository at this point in the history
fix TestPidListerFailure on cgroupsv2
  • Loading branch information
k8s-ci-robot committed Feb 20, 2021
2 parents 0b5dd00 + 0156eb1 commit 03b0ec9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/util/oom/oom_linux_test.go
Expand Up @@ -19,6 +19,8 @@ limitations under the License.
package oom

import (
"os"

"github.com/opencontainers/runc/libcontainer/cgroups"
"testing"

Expand Down Expand Up @@ -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)
}

0 comments on commit 03b0ec9

Please sign in to comment.