From 50ce4a902e4a37df378b595a5a5960d4c192412b Mon Sep 17 00:00:00 2001 From: justinsb Date: Wed, 4 Dec 2024 08:46:46 -0500 Subject: [PATCH] tests: fix linter-detected problem with error handling A small cleanup to keep the linter happier. --- nodeup/pkg/model/kubelet_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nodeup/pkg/model/kubelet_test.go b/nodeup/pkg/model/kubelet_test.go index b5a808b3787ce..e526c0527a942 100644 --- a/nodeup/pkg/model/kubelet_test.go +++ b/nodeup/pkg/model/kubelet_test.go @@ -222,10 +222,6 @@ func runKubeletBuilder(t *testing.T, context *fi.NodeupModelBuilderContext, node { task := builder.buildSystemdService() - if err != nil { - t.Fatalf("error from KubeletBuilder buildSystemdService: %v", err) - return - } context.AddTask(task) } } @@ -250,8 +246,7 @@ func BuildNodeupModelContext(model *testutils.Model) (*NodeupModelContext, error return nil, fmt.Errorf("error from BuildCloud: %v", err) } - err = cloudup.PerformAssignments(model.Cluster, vfs.Context, cloud) - if err != nil { + if err := cloudup.PerformAssignments(model.Cluster, vfs.Context, cloud); err != nil { return nil, fmt.Errorf("error from PerformAssignments: %v", err) }