mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-11-23 00:06:24 +00:00
tests: run build tests in parallel
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
b09f0e07ad
commit
46494b54c9
@ -45,6 +45,7 @@ func testSysconfig(t *testing.T, ctx context.Context, img, sysconf, kernel, init
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSyslinuxCfg(t *testing.T) {
|
func TestSyslinuxCfg(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
image string
|
image string
|
||||||
kernel string
|
kernel string
|
||||||
@ -118,12 +119,14 @@ func TestSyslinuxCfg(t *testing.T) {
|
|||||||
sysconfig: syslinuxCfgCentOS,
|
sysconfig: syslinuxCfgCentOS,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
|
||||||
defer cancel()
|
|
||||||
exec.SetDebug(true)
|
exec.SetDebug(true)
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
test := test
|
||||||
t.Run(test.image, func(t *testing.T) {
|
t.Run(test.image, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
defer cancel()
|
||||||
testSysconfig(t, ctx, test.image, test.sysconfig, test.kernel, test.initrd)
|
testSysconfig(t, ctx, test.image, test.sysconfig, test.kernel, test.initrd)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user