mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/int: use destroyContainer
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -1373,9 +1373,7 @@ func testPidnsInitKill(t *testing.T, config *configs.Config) {
|
||||
// Run a container with two long-running processes.
|
||||
container, err := newContainer(t, config)
|
||||
ok(t, err)
|
||||
defer func() {
|
||||
_ = container.Destroy()
|
||||
}()
|
||||
defer destroyContainer(container)
|
||||
|
||||
process1 := &libcontainer.Process{
|
||||
Cwd: "/",
|
||||
@@ -1796,7 +1794,7 @@ func TestBindMountAndUser(t *testing.T) {
|
||||
|
||||
container, err := newContainer(t, config)
|
||||
ok(t, err)
|
||||
defer container.Destroy() //nolint: errcheck
|
||||
defer destroyContainer(container)
|
||||
|
||||
var stdout bytes.Buffer
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestSeccompDenySyslogWithErrno(t *testing.T) {
|
||||
|
||||
container, err := newContainer(t, config)
|
||||
ok(t, err)
|
||||
defer container.Destroy() //nolint:errcheck
|
||||
defer destroyContainer(container)
|
||||
|
||||
buffers := newStdBuffers()
|
||||
pwd := &libcontainer.Process{
|
||||
@@ -81,7 +81,7 @@ func TestSeccompDenySyslog(t *testing.T) {
|
||||
|
||||
container, err := newContainer(t, config)
|
||||
ok(t, err)
|
||||
defer container.Destroy() //nolint:errcheck
|
||||
defer destroyContainer(container)
|
||||
|
||||
buffers := newStdBuffers()
|
||||
pwd := &libcontainer.Process{
|
||||
@@ -136,7 +136,7 @@ func TestSeccompPermitWriteConditional(t *testing.T) {
|
||||
|
||||
container, err := newContainer(t, config)
|
||||
ok(t, err)
|
||||
defer container.Destroy() //nolint:errcheck
|
||||
defer destroyContainer(container)
|
||||
|
||||
buffers := newStdBuffers()
|
||||
dmesg := &libcontainer.Process{
|
||||
@@ -188,7 +188,7 @@ func TestSeccompDenyWriteConditional(t *testing.T) {
|
||||
|
||||
container, err := newContainer(t, config)
|
||||
ok(t, err)
|
||||
defer container.Destroy() //nolint:errcheck
|
||||
defer destroyContainer(container)
|
||||
|
||||
buffers := newStdBuffers()
|
||||
dmesg := &libcontainer.Process{
|
||||
|
||||
Reference in New Issue
Block a user