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