<#8112 feature: Support `meltano test` for taps> I...
# meltano-repo-activity
g
#8112 feature: Support
meltano test
for taps
Issue created by edgarrmondragon ### Feature scope CLI (options, error messages, logging, etc.) ### Description ## Problem The
meltano test
CLI uses plugin commands to run tests for one or more plugins. However It's not working great at the moment for taps because Meltano doesn't know that it also needs to pass other options, like
--config
, so it fails if config is required. ## Proposal • Add a new boolean
pass_plugin_args
field to the
Command
object. • Update
PluginInvoker.exec_args
to call
self.plugin.exec_args
, if
command_config.pass_plugin_args
is true. meltano/src/meltano/core/plugin_invoker.py Lines 292 to 298 in</meltano/meltano/commit/d59a7c93f6c2d49abe8b1f6d094f60ed19bab54e|d59a7c9> | if command: | | -------------------------------------------------------- | | command_config = self.find_command(command) | | plugin_args = command_config.expanded_args(command, env) | | if command_config.executable: | | executable = self.exec_path(command_config.executable) | | else: | | plugin_args = self.plugin.exec_args(self) | This will allow Meltano to call
tap-example --config ... --test
under the hood. With that, the following config plugins: extractors: - name: tap-stackexchange variant: meltanolabs pip_url: git+https://github.com/MeltanoLabs/tap-stackexchange.git commands: test: pass_plugin_args: true args: --test should allow
meltano test tap-stackexchange
to work as expected. meltano/meltano