Add acceptance test coverage
The plugin had no tests at all. Add ProjectDownloadCommandsIT, a
LightweightPluginDaemonTest that exercises the full path end to end:
a download command configured in the plugin section of project.config
is picked up by the ref-updated listener and appears, with all
placeholders substituted, in the change's fetch info as reported by
the REST API.
Core itself ships no DownloadScheme implementations (they live in the
download-commands core plugin), so the test registers a minimal
scheme through ExtensionRegistry; without one the fetch map is empty
and download commands have nothing to attach to. The command
installation is asynchronous behind the plugin's ref-updated
listener, so the assertion polls with WaitUtil.
Test Plan:
bazel test plugins/project-download-commands/...
Change-Id: I9b52f7d84a06c31e8d5a9e2f710c4b8365dfa219
2 files changed