From 1dbd14f7c907885cce1e9d0941b764dd41537815 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Fri, 20 Jan 2023 08:30:18 +0100 Subject: [PATCH] :seedling: test VM configure RAM and CPUs (#690) seedling: test VM configure RAM and CPUs Allow adding more CPU and RAM for the test machine. This improves perfomance of tests. You can now run the suite with the following command to create a test VM with more CPUs and RAM: ``` MEMORY=9048 CPUS=4 ISO=.../kairos/kairos-...iso CREATE_VM=true ginkgo run tests/ ``` Fix #689 Signed-off-by: Oz Tiram Signed-off-by: Oz Tiram --- tests/tests_suite_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/tests_suite_test.go b/tests/tests_suite_test.go index ea3dd87aa..0db612a6a 100644 --- a/tests/tests_suite_test.go +++ b/tests/tests_suite_test.go @@ -113,6 +113,15 @@ var _ = BeforeSuite(func() { opts = append(opts, types.VBoxEngine) } + memory := os.Getenv("MEMORY") + if memory != "" { + opts = append(opts, types.WithMemory(os.Getenv("MEMORY"))) + } + cpu := os.Getenv("CPU") + if cpu != "" { + opts = append(opts, types.WithCPU(os.Getenv("CPUS"))) + } + m, err := machine.New(opts...) if err != nil { Fail(err.Error())