Skip to content

Commit fde04db

Browse files
committed
Fix lint: gofmt alignment, perfsprint, testifylint
Co-authored-by: Isaac
1 parent 88a7f73 commit fde04db

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

experimental/aitools/cmd/install_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ func TestInstallCommandsDelegateToSkillsInstall(t *testing.T) {
5252
calls := setupInstallMock(t)
5353

5454
tests := []struct {
55-
name string
56-
newCmd func() *cobra.Command
57-
args []string
58-
flags []string
59-
wantAgents int
60-
wantSkills []string
61-
wantExperimental bool
55+
name string
56+
newCmd func() *cobra.Command
57+
args []string
58+
flags []string
59+
wantAgents int
60+
wantSkills []string
61+
wantExperimental bool
6262
}{
6363
{
6464
name: "skills install installs all skills for all agents",

experimental/aitools/lib/installer/installer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package installer
22

33
import (
44
"context"
5+
"errors"
56
"fmt"
67
"io"
78
"net/http"
@@ -143,7 +144,7 @@ func InstallSkillsForAgents(ctx context.Context, src ManifestSource, targetAgent
143144
if state == nil {
144145
isLegacy := checkLegacyInstall(ctx, globalDir)
145146
if isLegacy && len(opts.SpecificSkills) > 0 {
146-
return fmt.Errorf("legacy install detected without state tracking; run 'databricks experimental aitools skills install' (without a skill name) first to rebuild state")
147+
return errors.New("legacy install detected without state tracking; run 'databricks experimental aitools skills install' (without a skill name) first to rebuild state")
147148
}
148149
}
149150

experimental/aitools/lib/installer/installer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ func TestIdempotentInstallReinstallsForNewAgent(t *testing.T) {
516516
require.NoError(t, err)
517517

518518
// Skills should be re-fetched because agent2 doesn't have them yet.
519-
assert.Greater(t, fetchCalls, 0, "should re-install skills for new agent")
519+
assert.Positive(t, fetchCalls, "should re-install skills for new agent")
520520

521521
// Verify agent2 got the skills.
522522
agent2SkillsDir := filepath.Join(agent2Dir, "skills")

0 commit comments

Comments
 (0)