traefik/pkg/collector/collector_test.go
2024-01-16 15:42:38 +01:00

22 lines
495 B
Go

package collector
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/traefik/traefik/v3/pkg/collector/hydratation"
"github.com/traefik/traefik/v3/pkg/config/static"
)
func Test_createBody(t *testing.T) {
var staticConfiguration static.Configuration
err := hydratation.Hydrate(&staticConfiguration)
require.NoError(t, err)
buffer, err := createBody(&staticConfiguration)
require.NoError(t, err)
assert.NotEmpty(t, buffer)
}