1
0
Fork 0
golang-forgejo-f3-gof3/forges/filesystem/tests/helpers.go
Daniel Baumann 03bfe4079e
Adding upstream version 3.10.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-18 09:37:23 +02:00

23 lines
590 B
Go

// Copyright Earl Warren <contact@earl-warren.org>
// Copyright Loïc Dachary <loic@dachary.org>
// SPDX-License-Identifier: MIT
package tests
import (
"testing"
filesystem_options "code.forgejo.org/f3/gof3/v3/forges/filesystem/options"
"code.forgejo.org/f3/gof3/v3/logger"
"code.forgejo.org/f3/gof3/v3/options"
)
func newTestOptions(t *testing.T) options.Interface {
t.Helper()
o := options.GetFactory(filesystem_options.Name)().(*filesystem_options.Options)
o.Directory = t.TempDir()
l := logger.NewLogger()
l.SetLevel(logger.Trace)
o.OptionsLogger.SetLogger(l)
return o
}