mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-12 03:27:35 +00:00
new IP allocator and add postgres to integration tests. (#1756)
This commit is contained in:
@@ -18,12 +18,15 @@ import (
|
||||
"github.com/puzpuzpuz/xsync/v3"
|
||||
"github.com/samber/lo"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"tailscale.com/envknob"
|
||||
)
|
||||
|
||||
const (
|
||||
scenarioHashLength = 6
|
||||
)
|
||||
|
||||
var usePostgresForTest = envknob.Bool("HEADSCALE_INTEGRATION_POSTGRES")
|
||||
|
||||
func enabledVersions(vs map[string]bool) []string {
|
||||
var ret []string
|
||||
for version, enabled := range vs {
|
||||
@@ -452,6 +455,10 @@ func (s *Scenario) CreateHeadscaleEnv(
|
||||
tsOpts []tsic.Option,
|
||||
opts ...hsic.Option,
|
||||
) error {
|
||||
if usePostgresForTest {
|
||||
opts = append(opts, hsic.WithPostgres())
|
||||
}
|
||||
|
||||
headscale, err := s.Headscale(opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user