mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 13:07:07 +00:00
Merge pull request #98960 from BenTheElder/oom-test-v2
fix TestPidListerFailure on cgroupsv2
This commit is contained in:
commit
03b0ec955a
@ -19,6 +19,8 @@ limitations under the License.
|
|||||||
package oom
|
package oom
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/opencontainers/runc/libcontainer/cgroups"
|
"github.com/opencontainers/runc/libcontainer/cgroups"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@ -100,5 +102,5 @@ func TestOOMScoreAdjContainer(t *testing.T) {
|
|||||||
|
|
||||||
func TestPidListerFailure(t *testing.T) {
|
func TestPidListerFailure(t *testing.T) {
|
||||||
_, err := getPids("/does/not/exist")
|
_, 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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user