File: main_test.go

package info (click to toggle)
golang-github-zorkian-go-datadog-api 2.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,612 kB
  • sloc: makefile: 28; sh: 13
file content (26 lines) | stat: -rw-r--r-- 491 bytes parent folder | download
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())
}