aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/container_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/container_test.go')
-rw-r--r--container/container_test.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/container/container_test.go b/container/container_test.go
index 0d6a7976..bcbcdded 100644
--- a/container/container_test.go
+++ b/container/container_test.go
@@ -16,7 +16,6 @@ import (
"strings"
"syscall"
"testing"
- "time"
"hakurei.app/check"
"hakurei.app/command"
@@ -436,11 +435,8 @@ func TestContainer(t *testing.T) {
wantOps, wantOpsCtx := tc.ops(t)
wantMnt := tc.mnt(t, wantOpsCtx)
- ctx, cancel := context.WithTimeout(t.Context(), helperDefaultTimeout)
- defer cancel()
-
var libPaths []*check.Absolute
- c := helperNewContainerLibPaths(ctx, &libPaths, "container", strconv.Itoa(i))
+ c := helperNewContainerLibPaths(t.Context(), &libPaths, "container", strconv.Itoa(i))
c.Uid = tc.uid
c.Gid = tc.gid
c.Hostname = hostnameFromTestCase(tc.name)
@@ -450,7 +446,6 @@ func TestContainer(t *testing.T) {
} else {
c.Stdout, c.Stderr = os.Stdout, os.Stderr
}
- c.WaitDelay = helperDefaultTimeout
*c.Ops = append(*c.Ops, *wantOps...)
c.SeccompRules = tc.rules
c.SeccompFlags = tc.flags | seccomp.AllowMultiarch
@@ -553,11 +548,10 @@ func testContainerCancel(
) func(t *testing.T) {
return func(t *testing.T) {
t.Parallel()
- ctx, cancel := context.WithTimeout(t.Context(), helperDefaultTimeout)
+ ctx, cancel := context.WithCancel(t.Context())
c := helperNewContainer(ctx, "block")
c.Stdout, c.Stderr = os.Stdout, os.Stderr
- c.WaitDelay = helperDefaultTimeout
if containerExtra != nil {
containerExtra(c)
}
@@ -738,8 +732,7 @@ func init() {
const (
envDoCheck = "HAKUREI_TEST_DO_CHECK"
- helperDefaultTimeout = 5 * time.Second
- helperInnerPath = "/usr/bin/helper"
+ helperInnerPath = "/usr/bin/helper"
)
var (