1
0
Fork 0

fix: prevent failure of collected data

This commit is contained in:
Ludovic Fernandez 2022-05-03 15:54:08 +02:00 committed by GitHub
parent 6c2eb6eef3
commit 2968e5b61b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 206 additions and 10 deletions

View file

@ -0,0 +1,21 @@
package collector
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/traefik/traefik/v2/pkg/config/static"
)
func Test_createBody(t *testing.T) {
var staticConfiguration static.Configuration
err := hydrate(&staticConfiguration)
require.NoError(t, err)
buffer, err := createBody(&staticConfiguration)
require.NoError(t, err)
assert.NotEmpty(t, buffer)
}