Skip to content

Commit

Permalink
dev: add rewritable paths for norm tests
Browse files Browse the repository at this point in the history
Tests in `pkg/sql/opt/norm` are similar to tests in `pkg/sql/opt/xform`
and `pkg/sql/opt/memo` in that they rely on fixtures in
`pkg/sql/opt/testutils/opttester/testfixtures`. This commit adds these
fixtures as rewritable paths for norm tests so that
`./dev test pkg/sql/opt/xform --rewrite` does not fail with errors like:

    open pkg/sql/opt/testutils/opttester/testfixtures/tpcc_schema: operation not permitted

Release note: None
  • Loading branch information
mgartner committed Jul 28, 2022
1 parent c134456 commit dc7a3df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/dev/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func (d *dev) test(cmd *cobra.Command, commandLine []string) error {
extraRewritablePaths = []struct{ pkg, path string }{
{"pkg/ccl/logictestccl", "pkg/sql/logictest"},
{"pkg/sql/opt/memo", "pkg/sql/opt/testutils/opttester/testfixtures"},
{"pkg/sql/opt/norm", "pkg/sql/opt/testutils/opttester/testfixtures"},
{"pkg/sql/opt/xform", "pkg/sql/opt/testutils/opttester/testfixtures"},
}
)
Expand Down

0 comments on commit dc7a3df

Please sign in to comment.