Skip to content

Commit

Permalink
Add tests to ensure we can marshal and unmarshal our min/max times
Browse files Browse the repository at this point in the history
Related to prometheus/client_golang#614

Signed-off-by: Thomas Jackson <[email protected]>
  • Loading branch information
jacksontj committed Jul 6, 2019
1 parent 3847802 commit 994ae75
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/api/v1/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,14 @@ func TestParseTime(t *testing.T) {
input: "1543578564.705",
result: time.Unix(1543578564, 705*1e6),
},
{
input: minTime.Format(time.RFC3339Nano),
result: minTime,
},
{
input: maxTime.Format(time.RFC3339Nano),
result: maxTime,
},
}

for _, test := range tests {
Expand Down

0 comments on commit 994ae75

Please sign in to comment.