aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/config_list_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/e2e/config_list_test.go')
-rw-r--r--pkg/machine/e2e/config_list_test.go45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkg/machine/e2e/config_list_test.go b/pkg/machine/e2e/config_list_test.go
new file mode 100644
index 000000000..78f9edc62
--- /dev/null
+++ b/pkg/machine/e2e/config_list_test.go
@@ -0,0 +1,45 @@
+package e2e_test
+
+type listMachine struct {
+ /*
+ --format string Format volume output using JSON or a Go template (default "{{.Name}}\t{{.VMType}}\t{{.Created}}\t{{.LastUp}}\t{{.CPUs}}\t{{.Memory}}\t{{.DiskSize}}\n")
+ --noheading Do not print headers
+ -q, --quiet Show only machine names
+ */
+
+ format string
+ noHeading bool
+ quiet bool
+
+ cmd []string
+}
+
+func (i *listMachine) buildCmd(m *machineTestBuilder) []string {
+ cmd := []string{"machine", "list"}
+ if len(i.format) > 0 {
+ cmd = append(cmd, "--format", i.format)
+ }
+ if i.noHeading {
+ cmd = append(cmd, "--noheading")
+ }
+ if i.quiet {
+ cmd = append(cmd, "--quiet")
+ }
+ i.cmd = cmd
+ return cmd
+}
+
+func (i *listMachine) withNoHeading() *listMachine {
+ i.noHeading = true
+ return i
+}
+
+func (i *listMachine) withQuiet() *listMachine {
+ i.quiet = true
+ return i
+}
+
+func (i *listMachine) withFormat(format string) *listMachine {
+ i.format = format
+ return i
+}