From 50b6ba05e9e456268c900e232a618c1b0e18f33a Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Mon, 8 Jan 2024 16:58:39 -0800 Subject: [PATCH] fix tests Signed-off-by: Kevin Su --- flyteidl/clients/go/admin/client.go | 1 + .../plugins/webapi/agent/integration_test.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/flyteidl/clients/go/admin/client.go b/flyteidl/clients/go/admin/client.go index 85476ab8ba..521b6e1e4d 100644 --- a/flyteidl/clients/go/admin/client.go +++ b/flyteidl/clients/go/admin/client.go @@ -6,6 +6,7 @@ import ( "crypto/x509" "errors" "fmt" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/artifact" grpcRetry "github.com/grpc-ecosystem/go-grpc-middleware/retry" diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go index 827af0d907..a2b2135591 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go @@ -40,9 +40,25 @@ type MockPlugin struct { type MockAsyncTask struct { } +func (m *MockAsyncTask) GetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) (*admin.GetTaskMetricsResponse, error) { + panic("not implemented") +} + +func (m *MockAsyncTask) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (*admin.GetTaskLogsResponse, error) { + panic("not implemented") +} + type MockSyncTask struct { } +func (m *MockSyncTask) GetTaskMetrics(ctx context.Context, in *admin.GetTaskMetricsRequest, opts ...grpc.CallOption) (*admin.GetTaskMetricsResponse, error) { + panic("not implemented") +} + +func (m *MockSyncTask) GetTaskLogs(ctx context.Context, in *admin.GetTaskLogsRequest, opts ...grpc.CallOption) (*admin.GetTaskLogsResponse, error) { + panic("not implemented") +} + func (m *MockAsyncTask) CreateTask(_ context.Context, createTaskRequest *admin.CreateTaskRequest, _ ...grpc.CallOption) (*admin.CreateTaskResponse, error) { expectedArgs := []string{"pyflyte-fast-execute", "--output-prefix", "fake://bucket/prefix/nhv"} if slices.Equal(createTaskRequest.Template.GetContainer().Args, expectedArgs) {