From bd4e74caa089ec10a2735fa201895077996a5628 Mon Sep 17 00:00:00 2001 From: Malcolm Jones <17786500+mlclmj@users.noreply.github.com> Date: Sat, 19 Oct 2019 11:54:49 -0400 Subject: [PATCH] Add Automated Tests (#27) * Set new HttpClient via cleanhttp * .drone.yml and build status * add go get * add test deps * go mod * mod download --- .drone.yml | 11 +++++++++++ README.md | 2 ++ go.mod | 8 ++++++++ go.sum | 4 ++++ 4 files changed, 25 insertions(+) create mode 100644 .drone.yml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7f493bc --- /dev/null +++ b/.drone.yml @@ -0,0 +1,11 @@ +--- +kind: pipeline +type: docker +name: default + +steps: +- name: test + image: golang + commands: + - go mod download + - go test diff --git a/README.md b/README.md index 581af01..18f7314 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # grafana-api-golang-client +[![Build Status](https://cloud.drone.io/api/badges/nytm/go-grafana-api/status.svg)](https://cloud.drone.io/nytm/go-grafana-api) + Grafana HTTP API Client for Go ## Tests diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..f2ff8a8 --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module github.com/nytm/go-grafana-api + +go 1.12 + +require ( + github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b + github.com/hashicorp/go-cleanhttp v0.5.1 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a0633e9 --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b h1:/vQ+oYKu+JoyaMPDsv5FzwuL2wwWBgBbtj/YLCi4LuA= +github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b/go.mod h1:Xo4aNUOrJnVruqWQJBtW6+bTBDTniY8yZum5rF3b5jw= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=