aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/config_inspect_test.go
blob: ffd74220f1f05539fd810afe28dba1014f31bd57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package e2e_test

type inspectMachine struct {
	/*
		--format string   Format volume output using JSON or a Go template
	*/
	cmd    []string
	format string
}

func (i *inspectMachine) buildCmd(m *machineTestBuilder) []string {
	cmd := []string{"machine", "inspect"}
	if len(i.format) > 0 {
		cmd = append(cmd, "--format", i.format)
	}
	cmd = append(cmd, m.names...)
	i.cmd = cmd
	return cmd
}

func (i *inspectMachine) withFormat(format string) *inspectMachine {
	i.format = format
	return i
}