summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/config_info_test.go
blob: 4da40ab997305710d88db39e2520764dd7ef4989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package e2e_test

type infoMachine struct {
	format string
	cmd    []string
}

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

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