fix(f3): do not run the F3 CLI if F3 is disabled

This commit is contained in:
Earl Warren 2024-06-16 13:09:52 +02:00
parent 53d4e90411
commit 50afca7961
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 14 additions and 0 deletions

View file

@ -10,6 +10,8 @@ import (
"testing"
"code.gitea.io/gitea/cmd/forgejo"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/test"
"code.gitea.io/gitea/services/f3/driver/options"
"code.gitea.io/gitea/tests"
@ -56,6 +58,7 @@ func runApp(ctx context.Context, args ...string) (string, error) {
func TestF3_CmdMirror_LocalForgejo(t *testing.T) {
defer tests.PrepareTestEnv(t)()
defer test.MockVariableValue(&setting.F3.Enabled, true)()
ctx := context.Background()