Rebuild only forwarded to rebuild, and its sole consumer was the
composeService.rebuild forwarder, itself called by a single test. Keep one
exported Rebuild and let that test reach it through the devwatch service.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The createAndStart and removeDanglingImages fakes run on the rebuild's goroutine, where a failed assertion would only end that goroutine instead of failing the test cleanly. They now record what they observe and the checks run once the rebuild has settled.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The watch loop, its rebuild scheduler and their tests move to
internal/devwatch. The package declares the Backend it expects from the
engine; composeService implements it and keeps one-line forwarders.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>