Skip to content

Commit

Permalink
🌱 test VM configure RAM and CPUs (kairos-io#690)
Browse files Browse the repository at this point in the history
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 kairos-io#689

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

Signed-off-by: Oz Tiram <oz@spectrocloud.com>
  • Loading branch information
oz123 authored Jan 20, 2023
1 parent 44145a4 commit 1dbd14f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/tests_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 1dbd14f

Please sign in to comment.