Files
podman/pkg/cgroups/cgroups_test.go
Valentin Rothberg 5dded6fae7 bump go module to v3
We missed bumping the go module, so let's do it now :)

* Automated go code with github.com/sirkon/go-imports-rename
* Manually via `vgrep podman/v2` the rest

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-22 09:03:51 +01:00

33 lines
563 B
Go

package cgroups
import (
"testing"
"github.com/containers/podman/v3/pkg/rootless"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
func TestCreated(t *testing.T) {
// tests only works in rootless mode
if rootless.IsRootless() {
return
}
var resources spec.LinuxResources
cgr, err := New("machine.slice", &resources)
if err != nil {
t.Error(err)
}
if err := cgr.Delete(); err != nil {
t.Error(err)
}
cgr, err = NewSystemd("machine.slice")
if err != nil {
t.Error(err)
}
if err := cgr.Delete(); err != nil {
t.Error(err)
}
}