func parseArguments(args []string) (flags.FlagContext, error) {
	fc := flags.New()
	fc.NewBoolFlag("started", "s", "Shows only apps that are started")
	fc.NewBoolFlag("stopped", "o", "Shows only apps that are stopped")
	err := fc.Parse(args...)

	return fc, err
}
Beispiel #2
0
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("SSHOptions", func() {
	var (
		opts       *options.SSHOptions
		args       []string
		parseError error
		fc         flags.FlagContext
	)

	Describe("Parse", func() {
		BeforeEach(func() {
			fc = flags.New()
			fc.NewStringSliceFlag("L", "", "")
			fc.NewStringSliceFlag("command", "c", "")
			fc.NewIntFlag("app-instance-index", "i", "")
			fc.NewBoolFlag("skip-host-validation", "k", "")
			fc.NewBoolFlag("skip-remote-execution", "N", "")
			fc.NewBoolFlag("request-pseudo-tty", "t", "")
			fc.NewBoolFlag("force-pseudo-tty", "tt", "")
			fc.NewBoolFlag("disable-pseudo-tty", "T", "")

			args = []string{}
			parseError = nil
		})

		JustBeforeEach(func() {
			err := fc.Parse(args...)