[#1016] frostfs-node: Fix gopls issues

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-03-01 11:58:17 +03:00
parent 6dbb61caf4
commit d6534fd755
16 changed files with 53 additions and 52 deletions

View file

@ -53,7 +53,7 @@ func TestInitialize(t *testing.T) {
testInitialize(t, constants.MaxAlphabetNodes)
})
t.Run("too many nodes", func(t *testing.T) {
require.ErrorIs(t, generateTestData(t, t.TempDir(), constants.MaxAlphabetNodes+1), helper.ErrTooManyAlphabetNodes)
require.ErrorIs(t, generateTestData(t.TempDir(), constants.MaxAlphabetNodes+1), helper.ErrTooManyAlphabetNodes)
})
}
@ -61,7 +61,7 @@ func testInitialize(t *testing.T, committeeSize int) {
testdataDir := t.TempDir()
v := viper.GetViper()
require.NoError(t, generateTestData(t, testdataDir, committeeSize))
require.NoError(t, generateTestData(testdataDir, committeeSize))
v.Set(constants.ProtoConfigPath, filepath.Join(testdataDir, protoFileName))
// Set to the path or remove the next statement to download from the network.
@ -98,7 +98,7 @@ func testInitialize(t *testing.T, committeeSize int) {
})
}
func generateTestData(t *testing.T, dir string, size int) error {
func generateTestData(dir string, size int) error {
v := viper.GetViper()
v.Set(commonflags.AlphabetWalletsFlag, dir)

View file

@ -10,7 +10,7 @@ import (
func TestTTLNetCache(t *testing.T) {
ttlDuration := time.Millisecond * 50
cache := newNetworkTTLCache[string, time.Time](10, ttlDuration, testNetValueReader)
cache := newNetworkTTLCache(10, ttlDuration, testNetValueReader)
key := "key"

View file

@ -24,8 +24,14 @@ func TestMorphSection(t *testing.T) {
const path = "../../../../config/example/node"
rpcs := []client.Endpoint{
{"wss://rpc1.morph.frostfs.info:40341/ws", 1},
{"wss://rpc2.morph.frostfs.info:40341/ws", 2},
{
Address: "wss://rpc1.morph.frostfs.info:40341/ws",
Priority: 1,
},
{
Address: "wss://rpc2.morph.frostfs.info:40341/ws",
Priority: 2,
},
}
fileConfigTest := func(c *config.Config) {