File size: 510 Bytes
b47934a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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") != ""
}
|