From 748a9689c3ac4453cc280814ff01a4d2402a37aa Mon Sep 17 00:00:00 2001 From: Sorawis Nilparuk Date: Wed, 19 Feb 2025 14:33:24 -0800 Subject: [PATCH] use proto.Message instead of custom interface --- internal/daemon/controller/handlers/testing.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/daemon/controller/handlers/testing.go b/internal/daemon/controller/handlers/testing.go index a76c50693f..371b4402cf 100644 --- a/internal/daemon/controller/handlers/testing.go +++ b/internal/daemon/controller/handlers/testing.go @@ -8,17 +8,13 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/exp/slices" - "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/proto" ) -type protoReflector interface { - ProtoReflect() protoreflect.Message -} - // assertOutputFields asserts that the output fields of a group match the expected fields // fields that is nil or empty in the result will throw an error if they are listed in expectedFields // e.g. members when group does not contian any members -func AssertOutputFields(t *testing.T, p protoReflector, expectFields []string) { +func AssertOutputFields(t *testing.T, p proto.Message, expectFields []string) { msg := p.ProtoReflect() descriptor := msg.Descriptor() for i := 0; i < descriptor.Fields().Len(); i++ {