confluentinc / ducktape

System integration and performance tests
16 stars 98 forks source link

fixed #284 properly #310

Closed stan-is-hate closed 2 years ago

stan-is-hate commented 2 years ago

Previous fix for #284 broke glob loader for test suites - if you specified /folder/ in the test suite, all* files under that glob will be attempted to be loaded, which would break when we try to load non-python or non-test files. This PR introduces a proper fix, which checks if a symbol refers to a single file first, if so, just load it directly, else use the usual file name pattern matching.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

stan-is-hate commented 2 years ago

cc @vp-elitnet

stan-is-hate commented 2 years ago

@imcdo @vp-elitnet Now the more I think about it, I think another fix is needed, for the cases where you specify smth like this in the test suite:

- /some/path/*.py  # should apply regex or not??
- /some/path/*/whatever.py  # should not apply regex
- /some/path/file.py  # should not apply regex
- /some/path/*  # should apply regex
- /some/path/   # should apply regex

Clearly we need a more complex logic in there.