From 164fe00aad29690dfbb3eb7936e4f1e2df422283 Mon Sep 17 00:00:00 2001 From: Xiang Zhen Gan Date: Fri, 6 Dec 2024 09:19:34 +0800 Subject: [PATCH] update lint and test --- builder/deploy/imagerunner/remote_runner.go | 1 + component/model_test.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/builder/deploy/imagerunner/remote_runner.go b/builder/deploy/imagerunner/remote_runner.go index bb2b2f92..fca1e22b 100644 --- a/builder/deploy/imagerunner/remote_runner.go +++ b/builder/deploy/imagerunner/remote_runner.go @@ -342,6 +342,7 @@ func (h *RemoteRunner) ListWorkFlows(ctx context.Context, username string, per, if err != nil { return nil, fmt.Errorf("failed to list evaluation jobs, %w", err) } + defer response.Body.Close() var res types.ArgoWorkFlowListRes if err := json.NewDecoder(response.Body).Decode(&res); err != nil { return nil, err diff --git a/component/model_test.go b/component/model_test.go index 3cea82d9..3fcab707 100644 --- a/component/model_test.go +++ b/component/model_test.go @@ -232,9 +232,10 @@ func TestModelComponent_Show(t *testing.T) { HTTPCloneURL: "https://foo.com/s/foo/bar.git", SSHCloneURL: "test@127.0.0.1:s/foo/bar.git", }, - EnableInference: true, - EnableFinetune: true, - WidgetType: types.ModelWidgetTypeGeneration, + EnableInference: true, + EnableFinetune: true, + EnableEvaluation: true, + WidgetType: types.ModelWidgetTypeGeneration, }, model) }