apply review

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
Augustin Husson 2018-09-18 11:08:38 +02:00
parent e03869de76
commit 3c0b130e5e
2 changed files with 9 additions and 7 deletions

View file

@ -18,14 +18,15 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/targetgroup"
"io/ioutil"
"os"
"path/filepath"
"reflect"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/targetgroup"
)
type customSD struct {

View file

@ -14,10 +14,11 @@
package adapter
import (
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/discovery/targetgroup"
"reflect"
"testing"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/discovery/targetgroup"
)
// TestGenerateTargetGroups checks that the target is correctly generated.
@ -141,7 +142,7 @@ func TestGenerateTargetGroups(t *testing.T) {
result := generateTargetGroups(testCase.targetGroup)
if !reflect.DeepEqual(result, testCase.expectedCustomSD) {
t.Errorf("%v :\nresult produced %v\nmismatch the expected customSD: %v",
t.Errorf("%q failed\ngot: %#v\nexpected: %v",
testCase.title,
result,
testCase.expectedCustomSD)