From c0c2533aaa33fc6e2fa1247c9a08de8b911475f3 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 22 Oct 2024 17:12:32 -0500 Subject: [PATCH] more human readable json file tests Signed-off-by: Jeff Carr --- droplet.proto | 2 +- helpers.go | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/droplet.proto b/droplet.proto index 470d61c..5befe97 100644 --- a/droplet.proto +++ b/droplet.proto @@ -19,7 +19,7 @@ message Droplet { string default_state = 11; string preferred_hypervisor = 12; google.protobuf.Any testany = 13; - StorageInfo testsi = 14; + StorageInfo humantest = 14; message Network { string mac = 1; diff --git a/helpers.go b/helpers.go index 6660eb4..180452c 100644 --- a/helpers.go +++ b/helpers.go @@ -103,18 +103,13 @@ func (c *Cluster) AddDroplet(hostname string, cpus int, mem int) *Droplet { d.Cpus = 1 } d.Memory = SetGB(mem * 32) - if d.Testsi == nil { - fmt.Println("Testsi is NIL") - fmt.Println("Testsi is NIL") - fmt.Println("Testsi is NIL") - fmt.Println("Testsi is NIL") + if d.Humantest == nil { var newInfo StorageInfo newInfo = StorageInfo{Capacity: 64} - d.Testsi = &newInfo + d.Humantest = &newInfo } else { - d.Testsi.Capacity = SetGB(mem * 32) + d.Humantest.Capacity = SetGB(mem * 32) } - // d.Testsi = StorageInfo{Capacity: 64} c.Droplets = append(c.Droplets, d) return d }