Skip to content

Commit

Permalink
Update deps and satisfy new linter
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Nov 5, 2023
1 parent a9c32bd commit 031c2d4
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions cmd/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (c *test[R]) testCmd(t *testing.T) {
os.Args = append(os.Args, format.Args()...)

err := cmd.Execute()
assert.NoError(t, err)
require.NoError(t, err)

format.Validate(t, out.Bytes())
})
Expand Down Expand Up @@ -141,7 +141,7 @@ func assertExhaustiveArgs(t *testing.T, args []string, exclude ...string) {
if slices.Contains(exclude, f.Name) {
return
}
assert.NoError(t, assertContainsPrefix(args, "--"+f.Name), "please ensure you all available args are used in order to increase coverage or exclude them explicitly")
require.NoError(t, assertContainsPrefix(args, "--"+f.Name), "please ensure you all available args are used in order to increase coverage or exclude them explicitly")
})
}

Expand Down
6 changes: 4 additions & 2 deletions cmd/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import (
"github.com/metal-stack/metal-lib/pkg/pointer"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func Test_parseNetworks(t *testing.T) {
assert := assert.New(t)
require := require.New(t)

tests := []struct {
possibleNetworks []string
Expand Down Expand Up @@ -84,10 +86,10 @@ func Test_parseNetworks(t *testing.T) {
for _, test := range tests {
actual, err := parseNetworks(test.possibleNetworks)
if test.isError {
assert.Error(err, "Name: %s", test.name)
require.Error(err, "Name: %s", test.name)
assert.Nil(actual, "Name: %s", test.name)
} else {
assert.NoError(err, "Name: %s", test.name)
require.NoError(err, "Name: %s", test.name)
assert.NotNil(actual, "Name: %s", test.name)
assert.ElementsMatch(actual, test.expected, "Name: %s", test.name)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func Test_BasicRootCmdStuff(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
authHeader := r.Header.Get("Authorization")
if strings.HasPrefix(authHeader, "Bearer") {
assert.Equal(t, authHeader, "Bearer i-am-token")
assert.Equal(t, "Bearer i-am-token", authHeader)
} else if strings.HasPrefix(authHeader, "Metal-Admin") {
assert.Len(t, strings.Split(authHeader, " "), 2)
} else {
Expand All @@ -40,7 +40,7 @@ func Test_BasicRootCmdStuff(t *testing.T) {
_, err := w.Write(mustMarshal(t, &models.RestHealthResponse{
Status: pointer.Pointer(string(rest.HealthStatusHealthy)),
}))
assert.NoError(t, err)
require.NoError(t, err)
}))
defer ts.Close()

Expand Down
36 changes: 18 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ require (
github.com/fatih/color v1.15.0
github.com/go-openapi/runtime v0.26.0
github.com/go-openapi/strfmt v0.21.7
github.com/google/go-cmp v0.5.9
github.com/metal-stack/metal-go v0.24.2
github.com/metal-stack/metal-lib v0.13.3
github.com/google/go-cmp v0.6.0
github.com/metal-stack/metal-go v0.24.5
github.com/metal-stack/metal-lib v0.13.5
github.com/metal-stack/updater v1.1.5
github.com/metal-stack/v v1.0.3
github.com/olekukonko/tablewriter v0.0.6-0.20230925090304-df64c4bbad77
github.com/spf13/afero v1.10.0
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.17.0
github.com/stretchr/testify v1.8.4
Expand Down Expand Up @@ -53,7 +53,7 @@ require (
github.com/cloudflare/circl v1.3.3 // indirect
github.com/coreos/go-iptables v0.6.0 // indirect
github.com/coreos/go-oidc/v3 v3.6.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dblohm7/wingoes v0.0.0-20230803162905-5c6286bb8c6e // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand Down Expand Up @@ -83,7 +83,7 @@ require (
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/nftables v0.1.1-0.20230115205135-9aa6fdf5a28c // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
Expand Down Expand Up @@ -153,21 +153,21 @@ require (
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
go.uber.org/zap v1.26.0 // indirect
go4.org/mem v0.0.0-20220726221520-4f986261bf13 // indirect
go4.org/netipx v0.0.0-20230728180743-ad4cb58a6516 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.org/x/time v0.4.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
golang.zx2c4.com/wireguard/windows v0.5.3 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
Loading

0 comments on commit 031c2d4

Please sign in to comment.