Skip to content

Commit

Permalink
Merge pull request #76 from planetscale/fix-panic
Browse files Browse the repository at this point in the history
Properly set query loader in vt tester
  • Loading branch information
frouioui authored Nov 28, 2024
2 parents e9ef339 + dd8548d commit 4466450
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions go/cmd/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

func testerCmd() *cobra.Command {
var cfg vttester.Config
var inputType string

cmd := &cobra.Command{
Aliases: []string{"test"},
Expand All @@ -36,6 +37,12 @@ func testerCmd() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
cfg.Tests = args
cfg.Compare = true
loader, err := configureLoader(inputType, true)
if err != nil {
return err
}
cfg.Loader = loader

return usageErr(cmd, vttester.Run(cfg))
},
}
Expand All @@ -44,6 +51,7 @@ func testerCmd() *cobra.Command {

cmd.Flags().BoolVar(&cfg.OLAP, "olap", false, "Use OLAP to run the queries.")
cmd.Flags().BoolVar(&cfg.XUnit, "xunit", false, "Get output in an xml file instead of errors directory")
addInputTypeFlag(cmd, &inputType)

return cmd
}
Expand Down

0 comments on commit 4466450

Please sign in to comment.