Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
add example refactor for testing commands
Browse files Browse the repository at this point in the history
Signed-off-by: Jason McCallister <jason@craftcms.com>
  • Loading branch information
jasonmccallister committed Jul 27, 2020
1 parent 2743f41 commit e0a3ef7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions internal/cmd/iniset_max_execution_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ import (
"github.com/craftcms/nitro/internal/nitro"
)

// TODO work this into a new commands pkg with a func that returns the command for testing.
// func NewInisetMaxExecutionCommand(addr IPer) &cobra.Command {
// return &cobra.Command{
// Use: "max_execution_time",
// Short: "Change max_execution_time",
// Args: cobra.MinimumNArgs(1),
// RunE: func(cmd *cobra.Command, args []string) error {
// ip := addr.Get(flagMachineName)
// c := client.NewClient(ip, "50051")
// php := config.GetString("php", flagPhpVersion)
// resp, err := c.PhpIniSettings(cmd.Context(), &nitrod.ChangePhpIniSettingRequest{
// Version: php,
// Setting: nitrod.PhpIniSetting_MAX_EXECUTION_TIME,
// Value: args[0],
// })
// if err != nil {
// return err
// }
//
// fmt.Println(resp.Message)
//
// return nil
// },
// }
var inisetMaxExecutionTimeCommand = &cobra.Command{
Use: "max_execution_time",
Short: "Change max_execution_time",
Expand Down

0 comments on commit e0a3ef7

Please # to comment.