From e806b805d4dc5057db3b97a06d526a6250015268 Mon Sep 17 00:00:00 2001 From: Lukas Metzner Date: Fri, 4 Oct 2024 10:37:18 +0200 Subject: [PATCH] fix: updated capability response of the controller service (#732) See #327 SINGLE_NODE_MULTI_WRITER needs to be in the response of the ControllerGetCapabilities function to correctly integrate support for SINGLE_NODE_MULTI_WRITER access modes. This was missing from #725. --- internal/driver/controller.go | 7 +++++++ internal/driver/controller_test.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/driver/controller.go b/internal/driver/controller.go index 9a69f352..8e81ba0c 100644 --- a/internal/driver/controller.go +++ b/internal/driver/controller.go @@ -331,6 +331,13 @@ func (s *ControllerService) ControllerGetCapabilities(context.Context, *proto.Co }, }, }, + { + Type: &proto.ControllerServiceCapability_Rpc{ + Rpc: &proto.ControllerServiceCapability_RPC{ + Type: proto.ControllerServiceCapability_RPC_SINGLE_NODE_MULTI_WRITER, + }, + }, + }, }, } return resp, nil diff --git a/internal/driver/controller_test.go b/internal/driver/controller_test.go index f432f514..46e3452d 100644 --- a/internal/driver/controller_test.go +++ b/internal/driver/controller_test.go @@ -729,7 +729,7 @@ func TestControllerServiceControllerGetCapabilities(t *testing.T) { t.Fatal(err) } - if len(resp.Capabilities) != 4 { + if len(resp.Capabilities) != 5 { t.Fatalf("unexpected number of capabilities: %d", len(resp.Capabilities)) } }