Update fuzz contrib for updated image service
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
		| @@ -25,6 +25,7 @@ import ( | ||||
| 	_ "github.com/containerd/containerd/v2/metadata/plugin" | ||||
| 	_ "github.com/containerd/containerd/v2/pkg/cri" | ||||
| 	_ "github.com/containerd/containerd/v2/pkg/nri/plugin" | ||||
| 	_ "github.com/containerd/containerd/v2/plugins/cri/images" | ||||
| 	_ "github.com/containerd/containerd/v2/plugins/imageverifier" | ||||
| 	_ "github.com/containerd/containerd/v2/plugins/sandbox" | ||||
| 	_ "github.com/containerd/containerd/v2/plugins/streaming" | ||||
|   | ||||
| @@ -43,14 +43,15 @@ func FuzzCRIServer(data []byte) int { | ||||
| 	defer client.Close() | ||||
|  | ||||
| 	config := criconfig.Config{} | ||||
| 	imageConfig := criconfig.ImageConfig{} | ||||
|  | ||||
| 	imageService, err := images.NewService(config.ImageConfig, map[string]string{}, map[string]images.RuntimePlatform{}, client) | ||||
| 	imageService, err := images.NewService(imageConfig, &images.CRIImageServiceOptions{ | ||||
| 		Client: client, | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
|  | ||||
| 	is := images.NewGRPCService(imageService) | ||||
|  | ||||
| 	c, rs, err := server.NewCRIService(config, &server.CRIServiceOptions{ | ||||
| 		ImageService: imageService, | ||||
| 		Client:       client, | ||||
| @@ -63,7 +64,7 @@ func FuzzCRIServer(data []byte) int { | ||||
| 	return fuzzCRI(f, &service{ | ||||
| 		CRIService:           c, | ||||
| 		RuntimeServiceServer: rs, | ||||
| 		ImageServiceServer:   is, | ||||
| 		ImageServiceServer:   imageService.GRPCService(), | ||||
| 	}) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Derek McGowan
					Derek McGowan