-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use keys in headers for endpoints that allow this (#284)
- Loading branch information
Slavek Kabrda
authored
Nov 13, 2019
1 parent
43491ff
commit 557151e
Showing
4 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package integration | ||
|
||
import ( | ||
"testing" | ||
|
||
dd "github.com/zorkian/go-datadog-api" | ||
) | ||
|
||
func TestSeriesSubmit(t *testing.T) { | ||
metrics := []dd.Metric{{ | ||
Metric: dd.String("test.metric"), | ||
Points: []dd.DataPoint{{dd.Float64(1.0), dd.Float64(2.0)}}, | ||
Type: dd.String("gauge"), | ||
Host: dd.String("myhost"), | ||
Tags: []string{"some:tag"}, | ||
Unit: dd.String("unit"), | ||
}} | ||
|
||
err := client.PostMetrics(metrics) | ||
if err != nil { | ||
t.Fatalf("Posting metrics failed when it shouldn't. (%s)", err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters