Skip to content

Commit

Permalink
seedling: test VM configure RAM and CPUs
Browse files Browse the repository at this point in the history
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 <oz@spectrocloud.com>
  • Loading branch information
oz123 committed Jan 19, 2023
1 parent e378818 commit 6ea0811
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 6ea0811

Please sign in to comment.