openmeter / e2e /setup_test.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 5)
b47934a verified
Raw
History Blame Contribute Delete
510 Bytes
package e2e
import (
"os"
"testing"
"github.com/stretchr/testify/require"
api "github.com/openmeterio/openmeter/api/client/go"
)
func initClient(t testing.TB) *api.ClientWithResponses {
t.Helper()
address := os.Getenv("OPENMETER_ADDRESS")
if address == "" {
t.Skip("OPENMETER_ADDRESS not set")
}
client, err := api.NewClientWithResponses(address)
require.NoError(t, err)
return client
}
func shouldRunSlowTests(t *testing.T) bool {
t.Helper()
return os.Getenv("RUN_SLOW_TESTS") != ""
}