mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-27 19:37:08 +00:00
use want as name in test
This commit is contained in:
@@ -48,7 +48,8 @@ type LabelDiff struct {
|
||||
func main() {
|
||||
flag.Parse()
|
||||
if flag.NArg() != 2 {
|
||||
log.Fatalf("Incorrect number of arguments, expected 2 but received %d", len(os.Args)-1)
|
||||
log.Fatalf("Usage is %s <path1> <path2>, got %d arguments",
|
||||
filepath.Base(os.Args[0]), flag.NArg())
|
||||
}
|
||||
fa, err := os.Open(os.Args[1])
|
||||
if err != nil {
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestDiff(t *testing.T) {
|
||||
aContents string
|
||||
bContents string
|
||||
|
||||
expectedDiff metricsdiff.MetricsDiff
|
||||
want metricsdiff.MetricsDiff
|
||||
}{
|
||||
{
|
||||
name: "labels",
|
||||
@@ -25,7 +25,7 @@ func TestDiff(t *testing.T) {
|
||||
bContents: `
|
||||
metric_one{label_three="content", label_four="content"} 0
|
||||
`,
|
||||
expectedDiff: metricsdiff.MetricsDiff{
|
||||
want: metricsdiff.MetricsDiff{
|
||||
LabelDiffs: []metricsdiff.LabelDiff{
|
||||
{
|
||||
MetricsName: "metric_one",
|
||||
@@ -43,7 +43,7 @@ func TestDiff(t *testing.T) {
|
||||
bContents: `
|
||||
metric_two{label_two="content"} 0
|
||||
`,
|
||||
expectedDiff: metricsdiff.MetricsDiff{
|
||||
want: metricsdiff.MetricsDiff{
|
||||
Adds: []string{"metric_two"},
|
||||
Removes: []string{"metric_one"},
|
||||
},
|
||||
@@ -58,7 +58,7 @@ func TestDiff(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
md, err := metricsdiff.MetricsDiffFromReaders(bufA, bufB)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.expectedDiff, md)
|
||||
require.Equal(t, tc.want, md)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user