traefik/pkg/collector/collector_test.go

23 lines
495 B
Go
Raw Normal View History

2022-05-03 13:54:08 +00:00
package collector
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
2024-01-16 14:41:57 +00:00
"github.com/traefik/traefik/v3/pkg/collector/hydratation"
2023-02-03 14:24:05 +00:00
"github.com/traefik/traefik/v3/pkg/config/static"
2022-05-03 13:54:08 +00:00
)
func Test_createBody(t *testing.T) {
var staticConfiguration static.Configuration
err := hydratation.Hydrate(&staticConfiguration)
2022-05-03 13:54:08 +00:00
require.NoError(t, err)
buffer, err := createBody(&staticConfiguration)
require.NoError(t, err)
assert.NotEmpty(t, buffer)
}