From de325b21d0adad199ec05652cb8d9fff19248ddb Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 4 May 2023 13:53:35 +0200 Subject: [PATCH] [F3] it is experimental, do not enable by default --- custom/conf/app.example.ini | 2 +- modules/setting/f3.go | 2 +- tests/integration/cmd_f3_test.go | 1 + tests/integration/f3_test.go | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 4a1728744e..3e2c14ec8e 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -2446,7 +2446,7 @@ ROUTER = console ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Enable/Disable Friendly Forge Format (F3) -;ENABLED = true +;ENABLED = false ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/modules/setting/f3.go b/modules/setting/f3.go index 14408dfed4..8a66d68fc6 100644 --- a/modules/setting/f3.go +++ b/modules/setting/f3.go @@ -11,7 +11,7 @@ var ( F3 = struct { Enabled bool }{ - Enabled: true, + Enabled: false, } ) diff --git a/tests/integration/cmd_f3_test.go b/tests/integration/cmd_f3_test.go index 600c5d35f5..553584ffe1 100644 --- a/tests/integration/cmd_f3_test.go +++ b/tests/integration/cmd_f3_test.go @@ -24,6 +24,7 @@ import ( func Test_CmdF3(t *testing.T) { onGiteaRun(t, func(*testing.T, *url.URL) { AllowLocalNetworks := setting.Migrations.AllowLocalNetworks + setting.F3.Enabled = true setting.Migrations.AllowLocalNetworks = true // without migrations.Init() AllowLocalNetworks = true is not effective and // a http call fails with "...migration can only call allowed HTTP servers..." diff --git a/tests/integration/f3_test.go b/tests/integration/f3_test.go index 7543d8de49..598d80d11c 100644 --- a/tests/integration/f3_test.go +++ b/tests/integration/f3_test.go @@ -25,6 +25,7 @@ import ( func TestF3(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { AllowLocalNetworks := setting.Migrations.AllowLocalNetworks + setting.F3.Enabled = true setting.Migrations.AllowLocalNetworks = true AppVer := setting.AppVer // Gitea SDK (go-sdk) need to parse the AppVer from server response, so we must set it to a valid version string.