github.com/containers/podman/v4@v4.9.4/pkg/machine/e2e/config_start_test.go (about)

     1  package e2e_test
     2  
     3  type startMachine struct {
     4  	/*
     5  		No command line args other than a machine vm name (also not required)
     6  	*/
     7  	quiet  bool
     8  	noInfo bool
     9  }
    10  
    11  func (s startMachine) buildCmd(m *machineTestBuilder) []string {
    12  	cmd := []string{"machine", "start"}
    13  	if len(m.name) > 0 {
    14  		cmd = append(cmd, m.name)
    15  	}
    16  	if s.quiet {
    17  		cmd = append(cmd, "--quiet")
    18  	}
    19  	if s.noInfo {
    20  		cmd = append(cmd, "--no-info")
    21  	}
    22  	return cmd
    23  }
    24  
    25  func (s startMachine) withQuiet() startMachine {
    26  	s.quiet = true
    27  	return s
    28  }
    29  
    30  func (s startMachine) withNoInfo() startMachine {
    31  	s.noInfo = true
    32  	return s
    33  }