mirror of
https://github.com/jech/galene.git
synced 2024-12-22 07:15:47 +01:00
Fix api_test.go under Go 1.20.
This commit is contained in:
parent
dd979652c2
commit
1bb7172515
1 changed files with 12 additions and 8 deletions
|
@ -18,16 +18,20 @@ import (
|
|||
"github.com/jech/galene/token"
|
||||
)
|
||||
|
||||
var setupOnce = sync.OnceFunc(func() {
|
||||
Insecure = true
|
||||
err := Serve("localhost:1234", "")
|
||||
if err != nil {
|
||||
panic("could not start server")
|
||||
}
|
||||
})
|
||||
var setupOnce sync.Once
|
||||
|
||||
func setup() {
|
||||
setupOnce.Do(func() {
|
||||
Insecure = true
|
||||
err := Serve("localhost:1234", "")
|
||||
if err != nil {
|
||||
panic("could not start server")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func setupTest(dir, datadir string) error {
|
||||
setupOnce()
|
||||
setup()
|
||||
|
||||
group.Directory = dir
|
||||
group.DataDirectory = datadir
|
||||
|
|
Loading…
Reference in a new issue