Parallelize integration tests better

This commit is contained in:
Brian Picciano 2024-11-12 13:42:35 +01:00
parent 6ec56f2a88
commit 095489af2a
3 changed files with 9 additions and 1 deletions

View File

@ -127,6 +127,8 @@ func (c *NetworkConfig) fillDefaults() {
}
if c.VPN.Tun.Device == "" {
// TODO if there are multiple Networks then each one needs a unique
// device name.
c.VPN.Tun.Device = "isle-tun"
}

View File

@ -25,6 +25,8 @@ func TestCreate(t *testing.T) {
}
func TestLoad(t *testing.T) {
t.Parallel()
t.Run("given config", func(t *testing.T) {
var (
h = newIntegrationHarness(t)
@ -53,6 +55,8 @@ func TestLoad(t *testing.T) {
}
func TestJoin(t *testing.T) {
t.Parallel()
t.Run("simple", func(t *testing.T) {
var (
h = newIntegrationHarness(t)
@ -82,6 +86,8 @@ func TestJoin(t *testing.T) {
}
func TestNetwork_SetConfig(t *testing.T) {
t.Parallel()
allocsToRoles := func(
hostName nebula.HostName, allocs []bootstrap.GarageHostInstance,
) []garage.Role {

View File

@ -129,7 +129,7 @@ func (h *integrationHarness) mkNetworkConfig(
c.VPN.PublicAddr = newPublicAddr()
}
c.VPN.Tun.Device = newTunDevice() // TODO is this necessary??
c.VPN.Tun.Device = newTunDevice()
c.Storage.Allocations = make(
[]daecommon.ConfigStorageAllocation, opts.numStorageAllocs,