fix(deps): update golangci
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
435cb2e7f7
commit
8bfd0493b2
@ -139,7 +139,7 @@ steps:
|
||||
event: [ push, tag, pull_request ]
|
||||
|
||||
- name: api-lint
|
||||
image: golangci/golangci-lint:v1.59.1
|
||||
image: golangci/golangci-lint:v1.60.3
|
||||
pull: always
|
||||
environment:
|
||||
GOPROXY: 'https://goproxy.kolaente.de'
|
||||
@ -1352,6 +1352,6 @@ steps:
|
||||
- failure
|
||||
---
|
||||
kind: signature
|
||||
hmac: dc96a5f8aaa332b35fc02f1b8566493e494452d62bed52973d804f5347ae47ae
|
||||
hmac: 715c2bd948ee16e3a109e5dbf1377a3b3c1f61fae20d7ab299b6b47fbc5e9c6a
|
||||
|
||||
...
|
||||
|
@ -109,3 +109,7 @@ issues:
|
||||
text: 'structtag: struct field Position repeats json tag "position" also at'
|
||||
linters:
|
||||
- govet
|
||||
- path: pkg/cmd/user.go
|
||||
text: 'G115: integer overflow conversion uintptr -> int'
|
||||
linters:
|
||||
- gosec
|
||||
|
24
devenv.lock
24
devenv.lock
@ -3,11 +3,11 @@
|
||||
"devenv": {
|
||||
"locked": {
|
||||
"dir": "src/modules",
|
||||
"lastModified": 1723409744,
|
||||
"lastModified": 1724504184,
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "116159a4bfeaa79662f4c39dbfaf2fce6a5737f7",
|
||||
"treeHash": "ccbae63055f83e669996a88a3cbb4ef69febd002",
|
||||
"rev": "51338b58fd666f448db7486ec145dbe52db9b829",
|
||||
"treeHash": "cedf6d41b00189dfd5132772cb5f35fcb10a7f7b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -72,11 +72,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1723282977,
|
||||
"lastModified": 1724316499,
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
|
||||
"treeHash": "75cf71293251c603e56d6076098346b4128b2ec8",
|
||||
"rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841",
|
||||
"treeHash": "fe60fe6585f3b84f2ee7fcbf10f02f02fc5c54ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -88,11 +88,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1723175592,
|
||||
"lastModified": 1724224976,
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
|
||||
"treeHash": "a6b38d5232ae0ae0c666c37f5ec9620c14f30369",
|
||||
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
|
||||
"treeHash": "1b707e2dd1830bf99c662e1a1694c5c463d8026b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -112,11 +112,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723202784,
|
||||
"lastModified": 1724440431,
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "c7012d0c18567c889b948781bc74a501e92275d1",
|
||||
"treeHash": "0016d5d748d61d3bfaa69d3c02abff74740a46b7",
|
||||
"rev": "c8a54057aae480c56e28ef3e14e4960628ac495b",
|
||||
"treeHash": "40ee1da550348c789ed9503eea365533a618506c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -24,13 +24,13 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/asaskevich/govalidator"
|
||||
|
||||
"code.vikunja.io/api/pkg/db"
|
||||
"code.vikunja.io/api/pkg/initialize"
|
||||
"code.vikunja.io/api/pkg/log"
|
||||
"code.vikunja.io/api/pkg/models"
|
||||
"code.vikunja.io/api/pkg/user"
|
||||
|
||||
"github.com/asaskevich/govalidator"
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/term"
|
||||
|
@ -94,16 +94,16 @@ func AssertExists(t *testing.T, table string, values map[string]interface{}, cus
|
||||
} else {
|
||||
exists, err = x.Table(table).Where(values).Get(&v)
|
||||
}
|
||||
require.NoError(t, err, fmt.Sprintf("Failed to assert entries exist in db, error was: %s", err))
|
||||
require.NoError(t, err, "Failed to assert entries exist in db")
|
||||
if !exists {
|
||||
|
||||
all := []map[string]interface{}{}
|
||||
err = x.Table(table).Find(&all)
|
||||
require.NoError(t, err, fmt.Sprintf("Failed to assert entries exist in db, error was: %s", err))
|
||||
require.NoErrorf(t, err, "Failed to assert entries exist in db, error was: %s", err)
|
||||
pretty, err := json.MarshalIndent(all, "", " ")
|
||||
require.NoError(t, err, fmt.Sprintf("Failed to assert entries exist in db, error was: %s", err))
|
||||
require.NoErrorf(t, err, "Failed to assert entries exist in db, error was: %s", err)
|
||||
|
||||
t.Errorf(fmt.Sprintf("Entries %v do not exist in table %s\n\nFound entries instead: %v", values, table, string(pretty)))
|
||||
t.Errorf("Entries %v do not exist in table %s\n\nFound entries instead: %v", values, table, string(pretty))
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,13 +111,13 @@ func AssertExists(t *testing.T, table string, values map[string]interface{}, cus
|
||||
func AssertMissing(t *testing.T, table string, values map[string]interface{}) {
|
||||
v := make(map[string]interface{})
|
||||
exists, err := x.Table(table).Where(values).Exist(&v)
|
||||
require.NoError(t, err, fmt.Sprintf("Failed to assert entries don't exist in db, error was: %s", err))
|
||||
assert.False(t, exists, fmt.Sprintf("Entries %v exist in table %s", values, table))
|
||||
require.NoErrorf(t, err, "Failed to assert entries don't exist in db, error was: %s", err)
|
||||
assert.Falsef(t, exists, "Entries %v exist in table %s", values, table)
|
||||
}
|
||||
|
||||
// AssertCount checks if a number of entries exists in the database
|
||||
func AssertCount(t *testing.T, table string, where builder.Cond, count int64) {
|
||||
dbCount, err := x.Table(table).Where(where).Count()
|
||||
require.NoError(t, err, fmt.Sprintf("Failed to assert count in db, error was: %s", err))
|
||||
assert.Equal(t, count, dbCount, fmt.Sprintf("Found %d entries instead of expected %d in table %s", dbCount, count, table))
|
||||
require.NoErrorf(t, err, "Failed to assert count in db, error was: %s", err)
|
||||
assert.Equalf(t, count, dbCount, "Found %d entries instead of expected %d in table %s", dbCount, count, table)
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ func TestListUsers(t *testing.T) {
|
||||
|
||||
all, err := ListUsers(s, "uSEr1", nil)
|
||||
require.NoError(t, err)
|
||||
assert.NotEmpty(t, len(all))
|
||||
assert.NotEmpty(t, all)
|
||||
assert.Equal(t, "user1", all[0].Username)
|
||||
})
|
||||
t.Run("all users", func(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user