Acceptance Test Updates (#218)
* compute: don't pass choices
* blockstorage: don't pass choices
* DumpResource Function
This function prints a resource in JSON format but retains the actual
field name rather than using the name specified in the JSON tag.
* New DumpResource
This version just converts the resource into JSON. The original is
being left in git history for posterity.
* Renaming DumpResource to PrintResource
* Removing all print functions in favor of PrintResource
* Rebase reconcilliation
diff --git a/acceptance/tools/tools.go b/acceptance/tools/tools.go
index 7650fc1..d2fd298 100644
--- a/acceptance/tools/tools.go
+++ b/acceptance/tools/tools.go
@@ -2,8 +2,10 @@
import (
"crypto/rand"
+ "encoding/json"
"errors"
mrand "math/rand"
+ "testing"
"time"
)
@@ -63,3 +65,9 @@
}
return value
}
+
+// PrintResource returns a resource as a readable structure
+func PrintResource(t *testing.T, resource interface{}) {
+ b, _ := json.MarshalIndent(resource, "", " ")
+ t.Logf(string(b))
+}