Update go fuzz to directly instantiate server
Avoid importing the cmd libraries and create the server instance directly from the server library. Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
@@ -22,16 +22,9 @@ import (
|
||||
fuzz "github.com/AdaLogics/go-fuzz-headers"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
_ "github.com/containerd/containerd/cmd/containerd/builtins"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultRoot = "/var/lib/containerd"
|
||||
defaultState = "/tmp/containerd"
|
||||
defaultAddress = "/tmp/containerd/containerd.sock"
|
||||
)
|
||||
|
||||
func fuzzContext() (context.Context, context.CancelFunc) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
ctx = namespaces.WithNamespace(ctx, "fuzzing-namespace")
|
||||
|
||||
Reference in New Issue
Block a user