forgejo/services/f3/driver/tests/new.go
Earl Warren 316682f17b chore(dependency): upgrade gof3 v3.10.6 (#7258)
cherry-pick from the forgefriends fork, except for the F3 API for mirroring which is a functional change that is not safe enough to introduce in Forgejo.

Refs: 3aad1f4e64

---

The motivation is to keep up-to-date with the rather large refactor of gof3. The changes are syntactic only and test is provided by the compliance suite.

Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7258
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-03-18 14:18:00 +00:00

39 lines
789 B
Go

// Copyright Earl Warren <contact@earl-warren.org>
// Copyright Loïc Dachary <loic@dachary.org>
// SPDX-License-Identifier: MIT
package tests
import (
"testing"
driver_options "code.gitea.io/gitea/services/f3/driver/options"
f3_kind "code.forgejo.org/f3/gof3/v3/kind"
"code.forgejo.org/f3/gof3/v3/options"
forge_test "code.forgejo.org/f3/gof3/v3/tree/tests/f3/forge"
)
type forgeTest struct {
forge_test.Base
}
func (o *forgeTest) NewOptions(t *testing.T) options.Interface {
return newTestOptions(t)
}
func (o *forgeTest) GetExceptions() []f3_kind.Kind {
return []f3_kind.Kind{}
}
func (o *forgeTest) GetNonTestUsers() []string {
return []string{
"user1",
}
}
func newForgeTest() forge_test.Interface {
t := &forgeTest{}
t.SetName(driver_options.Name)
return t
}