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

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
}