Skip to content

Commit 4466450

Browse files
authoredNov 28, 2024··
Merge pull request #76 from planetscale/fix-panic
Properly set query loader in vt tester
2 parents e9ef339 + dd8548d commit 4466450

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎go/cmd/tester.go

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626

2727
func testerCmd() *cobra.Command {
2828
var cfg vttester.Config
29+
var inputType string
2930

3031
cmd := &cobra.Command{
3132
Aliases: []string{"test"},
@@ -36,6 +37,12 @@ func testerCmd() *cobra.Command {
3637
RunE: func(cmd *cobra.Command, args []string) error {
3738
cfg.Tests = args
3839
cfg.Compare = true
40+
loader, err := configureLoader(inputType, true)
41+
if err != nil {
42+
return err
43+
}
44+
cfg.Loader = loader
45+
3946
return usageErr(cmd, vttester.Run(cfg))
4047
},
4148
}
@@ -44,6 +51,7 @@ func testerCmd() *cobra.Command {
4451

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

4856
return cmd
4957
}

0 commit comments

Comments
 (0)
Please sign in to comment.