tests: fix some error strings

This commit is contained in:
Vincent Bernat
2022-05-16 18:30:51 +02:00
parent 44ab2c380c
commit ec5fd0351a
3 changed files with 4 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ func TestBimapKeys(t *testing.T) {
sort.Ints(got)
sort.Ints(expected)
if diff := helpers.Diff(got, expected); diff != "" {
t.Errorf("Keys() (-want, +got):\n%s", diff)
t.Errorf("Keys() (-got, +want):\n%s", diff)
}
}
@@ -87,6 +87,6 @@ func TestBimapValues(t *testing.T) {
sort.Strings(got)
sort.Strings(expected)
if diff := helpers.Diff(got, expected); diff != "" {
t.Errorf("Values() (-want, +got):\n%s", diff)
t.Errorf("Values() (-got, +want):\n%s", diff)
}
}

View File

@@ -199,7 +199,7 @@ func TestQueryFlowsTables(t *testing.T) {
c.flowsTables = tc.Tables
got := c.queryFlowsTable(tc.Query, tc.Start, tc.End, tc.Resolution)
if diff := helpers.Diff(got, tc.Expected); diff != "" {
t.Fatalf("queryFlowsTable(): (-want, +got):\n%s", diff)
t.Fatalf("queryFlowsTable(): (-got, +want):\n%s", diff)
}
})
}

View File

@@ -41,7 +41,7 @@ func TestGetHTTPBaseURL(t *testing.T) {
expectedURL.Host = expectedURL.Host[strings.LastIndex(expectedURL.Host, ":"):]
// We can't really know our IP
if diff := helpers.Diff(parsedURL, expectedURL); diff != "" {
t.Fatalf("getHTTPBaseURL() (-want, +got):\n%s", diff)
t.Fatalf("getHTTPBaseURL() (-got, +want):\n%s", diff)
}
}