Pilot metrics provider
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
5b05c990b0
commit
0d5d14d41a
5 changed files with 712 additions and 27 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/containous/traefik/v2/pkg/config/runtime"
|
||||
"github.com/containous/traefik/v2/pkg/metrics"
|
||||
"github.com/containous/traefik/v2/pkg/safe"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -43,7 +44,7 @@ func TestTick(t *testing.T) {
|
|||
receivedConfig <- true
|
||||
})
|
||||
|
||||
pilot := New("token", safe.NewPool(context.Background()))
|
||||
pilot := New("token", metrics.RegisterPilot(), safe.NewPool(context.Background()))
|
||||
pilot.client.baseURL = server.URL
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
@ -118,6 +119,6 @@ func TestClient_SendConfiguration(t *testing.T) {
|
|||
token: myToken,
|
||||
}
|
||||
|
||||
err := client.SendData(context.Background(), RunTimeRepresentation{})
|
||||
err := client.SendData(context.Background(), RunTimeRepresentation{}, []metrics.PilotMetric{})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue