1
0

GODT-1815: Start with missing gluon files

This commit is contained in:
James Houlahan
2022-09-27 13:22:07 +02:00
parent 612fb7ad7b
commit 9670e29d9f
18 changed files with 241 additions and 101 deletions

View File

@ -5,6 +5,7 @@ import (
"crypto/tls"
"errors"
"net"
"os"
"testing"
"github.com/Masterminds/semver/v3"
@ -75,10 +76,20 @@ type TestLocationsProvider struct {
config, cache string
}
func NewTestLocationsProvider(tb testing.TB) *TestLocationsProvider {
func NewTestLocationsProvider(dir string) *TestLocationsProvider {
config, err := os.MkdirTemp(dir, "config")
if err != nil {
panic(err)
}
cache, err := os.MkdirTemp(dir, "cache")
if err != nil {
panic(err)
}
return &TestLocationsProvider{
config: tb.TempDir(),
cache: tb.TempDir(),
config: config,
cache: cache,
}
}