Fix servers transport not found

This commit is contained in:
Harold Ozouf 2021-02-01 12:36:03 +01:00 committed by GitHub
parent 2065f4c003
commit 96a3468791
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -119,14 +119,14 @@ func (p ProviderAggregator) Init() error {
// Provide calls the provide method of every providers.
func (p ProviderAggregator) Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error {
if p.fileProvider != nil {
launchProvider(configurationChan, pool, p.fileProvider)
}
if p.internalProvider != nil {
launchProvider(configurationChan, pool, p.internalProvider)
}
if p.fileProvider != nil {
launchProvider(configurationChan, pool, p.fileProvider)
}
for _, prd := range p.providers {
prd := prd
safe.Go(func() {

View file

@ -33,8 +33,8 @@ func TestProviderAggregator_Provide(t *testing.T) {
}()
// Make sure the file provider is always called first, followed by the internal provider.
requireReceivedMessageFromProviders(t, cfgCh, []string{"file"})
requireReceivedMessageFromProviders(t, cfgCh, []string{"internal"})
requireReceivedMessageFromProviders(t, cfgCh, []string{"file"})
// Check if all providers have been called, the order doesn't matter.
requireReceivedMessageFromProviders(t, cfgCh, []string{"salad", "tomato", "onion"})