From 98031ac004bebe56ecb8dcd2e5d224bc373d5afc Mon Sep 17 00:00:00 2001 From: Asad Khan Date: Mon, 16 Oct 2023 13:40:34 +0200 Subject: [PATCH] adding comments on test bahaviour Signed-off-by: Asad Khan --- plugins/bundle/plugin_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/bundle/plugin_test.go b/plugins/bundle/plugin_test.go index 99609e2257..037b9aaeff 100644 --- a/plugins/bundle/plugin_test.go +++ b/plugins/bundle/plugin_test.go @@ -3308,15 +3308,19 @@ func TestPluginStateReconciliationOnReconfigure(t *testing.T) { return } + // if there is a change in config + // Reconfigure sets the plugin state as StateNotReady ensurePluginState(t, plugin, plugins.StateNotReady) for name := range stage.cfg.Bundles { - go func() { + go func(name string) { _ = plugin.Loaders()[name].Trigger(ctx) - }() + }(name) <-statusCh } + // after all downloaders are processed the state should + // reconcile to StateOK, if there are no errors ensurePluginState(t, plugin, plugins.StateOK) }) }