This commit is contained in:
@@ -8,9 +8,9 @@ import (
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/cmd"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"gitea.dev/cmd"
|
||||
"gitea.dev/modules/setting"
|
||||
"gitea.dev/modules/util"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/urfave/cli/v3"
|
||||
@@ -38,7 +38,8 @@ func Test_CmdKeys(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// FIXME: this test is not quite right. Each "command run" always re-initializes settings
|
||||
keysCmd := cmd.NewKeysCommand()
|
||||
keysCmd.Before = nil // don't re-initialize logger during the test
|
||||
keysCmd.Before = nil // don't re-initialize logger during the test
|
||||
keysCmd.HideHelp = true // skip help on usage error, which would re-initialize settings (urfave/cli v3.10)
|
||||
|
||||
var stdout, stderr bytes.Buffer
|
||||
app := &cli.Command{
|
||||
|
||||
Reference in New Issue
Block a user