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
|
package integration
import (
"github.com/zorkian/go-datadog-api"
"log"
"os"
"testing"
)
var (
apiKey string
appKey string
client *datadog.Client
)
func TestMain(m *testing.M) {
apiKey = os.Getenv("DATADOG_API_KEY")
appKey = os.Getenv("DATADOG_APP_KEY")
if apiKey == "" || appKey == "" {
log.Fatal("Please make sure to set the env variables 'DATADOG_API_KEY' and 'DATADOG_APP_KEY' before running this test")
}
client = datadog.NewClient(apiKey, appKey)
os.Exit(m.Run())
}
|