fix: gci section warnings

Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
Mario Constanti 2024-02-22 07:31:51 +01:00
parent 8fc001f5f6
commit bd0b27ab10
51 changed files with 166 additions and 181 deletions

View file

@ -26,15 +26,18 @@ import (
"time"
"github.com/BurntSushi/toml"
"github.com/cloudbase/garm/params"
"github.com/cloudbase/garm/util/appdefaults"
zxcvbn "github.com/nbutton23/zxcvbn-go"
"github.com/pkg/errors"
"github.com/cloudbase/garm/params"
"github.com/cloudbase/garm/util/appdefaults"
)
type DBBackendType string
type LogLevel string
type LogFormat string
type (
DBBackendType string
LogLevel string
LogFormat string
)
const (
// MySQLBackend represents the MySQL DB backend

View file

@ -20,8 +20,9 @@ import (
"testing"
"time"
"github.com/cloudbase/garm/util/appdefaults"
"github.com/stretchr/testify/require"
"github.com/cloudbase/garm/util/appdefaults"
)
var (
@ -392,7 +393,6 @@ func TestGormParams(t *testing.T) {
require.Nil(t, err)
require.Equal(t, MySQLBackend, dbType)
require.Equal(t, "test:test@tcp(127.0.0.1)/garm?charset=utf8&parseTime=True&loc=Local&timeout=5s", uri)
}
func TestSQLiteConfig(t *testing.T) {

View file

@ -20,9 +20,9 @@ import (
"path/filepath"
"strings"
"github.com/cloudbase/garm-provider-common/util/exec"
"github.com/pkg/errors"
"github.com/cloudbase/garm-provider-common/util/exec"
)
// External represents the config for an external provider.

View file

@ -31,7 +31,7 @@ func getDefaultExternalConfig(t *testing.T) External {
}
t.Cleanup(func() { os.RemoveAll(dir) })
err = os.WriteFile(filepath.Join(dir, "garm-external-provider"), []byte{}, 0755)
err = os.WriteFile(filepath.Join(dir, "garm-external-provider"), []byte{}, 0o755)
if err != nil {
t.Fatalf("failed to write file: %s", err)
}