mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
apply review
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
parent
e03869de76
commit
3c0b130e5e
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue