databricks-cli/libs/template/testdata
Pieter Noordhuis ad8e61c739
Fix ability to import the CLI repository as module (#1671)
## Changes

While investigating #1629, I found that Go doesn't allow characters
outside the set documented at
https://pkg.go.dev/golang.org/x/mod/module#CheckFilePath.

To fix this, I changed the relevant test case to create the fixtures it
needs instead of loading it from the `testdata` directory (in
`renderer_test.go`).

Some test cases in `config_test.go` depended on templated paths without
needing to do so. In the process of fixing this, I refactored these
tests slightly to reduce dependencies between them.

This change also adds a test case to ensure that all files in the
repository are allowed to be part of a module (per the earlier
`CheckFilePath` function).

Fixes #1629.

## Tests

I manually confirmed I could import the repository as a Go module.
2024-08-12 14:20:04 +00:00
..
config-assign-from-default-value Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
config-assign-from-file Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
config-assign-from-file-invalid-int Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
config-assign-from-file-unknown-property Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
config-assign-from-templated-default-value Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
config-test-schema Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
copy-file-walk/template
email
empty Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
executable-bit-read/template
fail/template
file-tree-rendering/template/{{.dir_name}}
map-pair
print-without-processing/template
random-int/template
regexp-compile/template
skip/template
skip-all-files-in-cwd/template
skip-dir-eagerly/template
skip-is-relative/template
template-in-path Fix ability to import the CLI repository as module (#1671) 2024-08-12 14:20:04 +00:00
urlparse-function/template
uuid/template
walk/template
workspace-host/template