fix: wait for file and internal before applying configurations
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
This commit is contained in:
parent
32500773b8
commit
dd0701dd16
5 changed files with 25 additions and 17 deletions
|
@ -32,12 +32,11 @@ func TestProviderAggregator_Provide(t *testing.T) {
|
|||
errCh <- aggregator.Provide(cfgCh, pool)
|
||||
}()
|
||||
|
||||
// Make sure the internal provider is always called first, followed by the file provider.
|
||||
requireReceivedMessageFromProviders(t, cfgCh, []string{"internal"})
|
||||
// Make sure the file provider is always called first.
|
||||
requireReceivedMessageFromProviders(t, cfgCh, []string{"file"})
|
||||
|
||||
// Check if all providers have been called, the order doesn't matter.
|
||||
requireReceivedMessageFromProviders(t, cfgCh, []string{"salad", "tomato", "onion"})
|
||||
requireReceivedMessageFromProviders(t, cfgCh, []string{"salad", "tomato", "onion", "internal"})
|
||||
|
||||
require.NoError(t, <-errCh)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue