Benchmarking for wwctl overlay build

- Benchmarks overlay build in an environment with 1000 nodes
- Updates testenv to support both benchmarks and tests

To execute:

```
go test github.com/warewulf/warewulf/internal/app/wwctl/overlay/build -bench Benchmark_Overlay_Build
```

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-12-23 18:17:57 -07:00
parent 276e67fc54
commit a18913924d
55 changed files with 3361 additions and 245 deletions

View File

@@ -14,8 +14,8 @@ import (
func Test_Power_Status(t *testing.T) {
warewulfd.SetNoDaemon()
env := testenv.New(t)
defer env.RemoveAll(t)
env.WriteFile(t, "etc/warewulf/nodes.conf", `
defer env.RemoveAll()
env.WriteFile("etc/warewulf/nodes.conf", `
nodeprofiles:
default:
ipmi:
@@ -28,7 +28,7 @@ nodes:
- default
ipmi:
ipaddr: 10.10.10.10`)
env.ImportFile(t, "usr/share/warewulf/bmc/ipmitool.tmpl", "../../../../../lib/warewulf/bmc/ipmitool.tmpl")
env.ImportFile("usr/share/warewulf/bmc/ipmitool.tmpl", "../../../../../lib/warewulf/bmc/ipmitool.tmpl")
tests := map[string]struct {
args []string