Skip to content

Commit

Permalink
Align to new linter testifylint
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Nov 6, 2023
1 parent da98043 commit 7f087c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/internal/switcher/templates/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ func renderToString(t *testing.T, tpl *template.Template, c *types.Conf) string
func readConf(t *testing.T, i string) types.Conf {
c := types.Conf{}
b, err := os.ReadFile(i)
require.Nil(t, err, "unexpected error when reading testing input")
require.NoError(t, err, "unexpected error when reading testing input")

err = yaml.Unmarshal(b, &c)
require.Nil(t, err, "unexpected error when unmarshalling testing input")
require.NoError(t, err, "unexpected error when unmarshalling testing input")
return c
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/switcher/types/conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestFillVLANIDs(t *testing.T) {
},
}
err := c.FillVLANIDs(m)
require.Nil(t, err)
require.NoError(t, err)
require.Equal(t, uint16(1001), c.Ports.Vrfs["101001"].VLANID)
require.Equal(t, uint16(1002), c.Ports.Vrfs["101002"].VLANID)
require.Equal(t, uint16(1003), c.Ports.Vrfs["101003"].VLANID)
Expand Down

0 comments on commit 7f087c7

Please sign in to comment.