func GetTestCommand()

in mpdev/cmd/testcmd.go [25:40]


func GetTestCommand() *cobra.Command {
	var c command
	cmd := &cobra.Command{
		Use:     "test -f FILENAME [--dryRun]",
		Short:   docs.TestShort,
		Long:    docs.TestLong,
		Example: docs.TestExamples,
		RunE:    c.testRunE,
	}

	cmd.Flags().BoolVar(&c.DryRun, "dryrun", c.DryRun, "if set, validates configuration files without creating resource")
	cmd.Flags().StringSliceVarP(&c.Filenames, "filename", "f", c.Filenames, "that contains the configuration to test")
	_ = cobra.MarkFlagRequired(cmd.Flags(), "filename")

	return cmd
}