mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-08-21 16:03:41 +00:00
Fix problem when MACHINE_SPICY is not set
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
parent
95a352f4b4
commit
3c4663afa5
@ -37,6 +37,8 @@ type VMOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DefaultVMOptions() VMOptions {
|
func DefaultVMOptions() VMOptions {
|
||||||
|
var err error
|
||||||
|
|
||||||
memory := os.Getenv("MEMORY")
|
memory := os.Getenv("MEMORY")
|
||||||
if memory == "" {
|
if memory == "" {
|
||||||
memory = "2096"
|
memory = "2096"
|
||||||
@ -45,8 +47,12 @@ func DefaultVMOptions() VMOptions {
|
|||||||
if cpus == "" {
|
if cpus == "" {
|
||||||
cpus = "2"
|
cpus = "2"
|
||||||
}
|
}
|
||||||
runSpicy, err := strconv.ParseBool(os.Getenv("MACHINE_SPICY"))
|
|
||||||
Expect(err).ToNot(HaveOccurred())
|
runSpicy := false
|
||||||
|
if s := os.Getenv("MACHINE_SPICY"); s != "" {
|
||||||
|
runSpicy, err = strconv.ParseBool(os.Getenv("MACHINE_SPICY"))
|
||||||
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
}
|
||||||
|
|
||||||
useKVM := false
|
useKVM := false
|
||||||
if envKVM := os.Getenv("KVM"); envKVM != "" {
|
if envKVM := os.Getenv("KVM"); envKVM != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user