Closed mkenigs closed 2 weeks ago
Most of these tests can be converted into unit tests without much effort since we have the ability to seed the client with mock data.
Additional context:
/resolve
endpoint, so those tests should likely be moved elsewhere."'flox search' error message when no results"
could be turned into a unit test that detects whether Search::handle
returns an error whose .description
method contains the desired error message.impl Write
instances instead of assuming stdout
/stderr
. This lets you pass in buffers during testing, which could be useful for counting search results and verifying that certain error messages are printed.flox/flox
.
Do some combination of:
search.bats
that are impacted by the catalog and run them with the catalog feature flag set. Make any small changes required to get them passingIn any case:
FLOX_FEATURES_USE_CATALOG=true
and_FLOX_USE_CATALOG_MOCK=/dev/null
for all other tests in the file