diff --git a/app/victoria-metrics/main_test.go b/app/victoria-metrics/main_test.go index 7f13ebfc7..6eb2c13c9 100644 --- a/app/victoria-metrics/main_test.go +++ b/app/victoria-metrics/main_test.go @@ -373,7 +373,7 @@ func checkMetricsResult(got, want []Metric) error { want = removeIfFoundMetrics(r, want) } if len(want) > 0 { - return fmt.Errorf("exptected metrics %+v not found in %+v", want, got) + return fmt.Errorf("expected metrics %+v not found in %+v", want, got) } return nil } diff --git a/app/vmalert/config/config_test.go b/app/vmalert/config/config_test.go index 793a9f7c7..9e653480b 100644 --- a/app/vmalert/config/config_test.go +++ b/app/vmalert/config/config_test.go @@ -70,13 +70,13 @@ func TestParseBad(t *testing.T) { func TestRule_Validate(t *testing.T) { if err := (&Rule{}).Validate(); err == nil { - t.Errorf("exptected empty name error") + t.Errorf("expected empty name error") } if err := (&Rule{Alert: "alert"}).Validate(); err == nil { - t.Errorf("exptected empty expr error") + t.Errorf("expected empty expr error") } if err := (&Rule{Alert: "alert", Expr: "test>0"}).Validate(); err != nil { - t.Errorf("exptected valid rule; got %s", err) + t.Errorf("expected valid rule; got %s", err) } } diff --git a/app/vmalert/datasource/vm_test.go b/app/vmalert/datasource/vm_test.go index cc1382815..708f76a04 100644 --- a/app/vmalert/datasource/vm_test.go +++ b/app/vmalert/datasource/vm_test.go @@ -29,7 +29,7 @@ func TestVMSelectQuery(t *testing.T) { t.Errorf("expected %s:%s as basic auth got %s:%s", basicAuthName, basicAuthPass, name, pass) } if r.URL.Query().Get("query") != query { - t.Errorf("exptected %s in query param, got %s", query, r.URL.Query().Get("query")) + t.Errorf("expected %s in query param, got %s", query, r.URL.Query().Get("query")) } switch c { case 0: @@ -76,7 +76,7 @@ func TestVMSelectQuery(t *testing.T) { t.Fatalf("unexpected %s", err) } if len(m) != 1 { - t.Fatalf("exptected 1 metric got %d in %+v", len(m), m) + t.Fatalf("expected 1 metric got %d in %+v", len(m), m) } expected := Metric{ Labels: []Label{{Value: "vm_rows", Name: "__name__"}}, diff --git a/app/vmalert/main_test.go b/app/vmalert/main_test.go index 853cdcf3f..3dc45c0c7 100644 --- a/app/vmalert/main_test.go +++ b/app/vmalert/main_test.go @@ -41,7 +41,7 @@ func TestGetAlertURLGenerator(t *testing.T) { } _, err = getAlertURLGenerator(nil, "foo?{{invalid}}", true) if err == nil { - t.Errorf("exptected tempalte validation error got nil") + t.Errorf("expected tempalte validation error got nil") } fn, err = getAlertURLGenerator(u, "foo?query={{$value}}", true) if err != nil { diff --git a/app/vmalert/notifier/alertmanager_test.go b/app/vmalert/notifier/alertmanager_test.go index 18f2efcf4..f7bdb47d4 100644 --- a/app/vmalert/notifier/alertmanager_test.go +++ b/app/vmalert/notifier/alertmanager_test.go @@ -52,16 +52,16 @@ func TestAlertManager_Send(t *testing.T) { t.Errorf("expected 1 alert in array got %d", len(a)) } if a[0].GeneratorURL != "0/0" { - t.Errorf("exptected 0/0 as generatorURL got %s", a[0].GeneratorURL) + t.Errorf("expected 0/0 as generatorURL got %s", a[0].GeneratorURL) } if a[0].Labels["alertname"] != "alert0" { - t.Errorf("exptected alert0 as alert name got %s", a[0].Labels["alertname"]) + t.Errorf("expected alert0 as alert name got %s", a[0].Labels["alertname"]) } if a[0].StartsAt.IsZero() { - t.Errorf("exptected non-zero start time") + t.Errorf("expected non-zero start time") } if a[0].EndAt.IsZero() { - t.Errorf("exptected non-zero end time") + t.Errorf("expected non-zero end time") } } })