[F3] it is experimental, do not enable by default

This commit is contained in:
Earl Warren 2023-05-04 13:53:35 +02:00
parent d0fee30167
commit de325b21d0
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 4 additions and 2 deletions

View file

@ -2446,7 +2446,7 @@ ROUTER = console
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Enable/Disable Friendly Forge Format (F3)
;ENABLED = true
;ENABLED = false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -11,7 +11,7 @@ var (
F3 = struct {
Enabled bool
}{
Enabled: true,
Enabled: false,
}
)

View file

@ -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..."

View file

@ -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.