Chore: Enable whitespace linter (#25903)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-07-06 20:17:28 +02:00
committed by GitHub
parent 42295898b8
commit 41d432b5ae
189 changed files with 3 additions and 303 deletions
@@ -130,7 +130,6 @@ func (e *ApplicationInsightsDatasource) buildQueries(queries []*tsdb.Query, time
aggregation: insightsJSONModel.Aggregation,
dimensions: insightsJSONModel.Dimensions,
})
}
return applicationInsightsQueries, nil
@@ -121,7 +121,6 @@ func TestApplicationInsightsDatasource(t *testing.T) {
So(queries[0].Target, ShouldEqual, "aggregation=Average&filter=blob+eq+%27%2A%27&interval=PT1M&segment=blob&timespan=2018-03-15T13%3A00%3A00Z%2F2018-03-15T13%3A34%3A00Z")
So(queries[0].Params["filter"][0], ShouldEqual, "blob eq '*'")
})
Convey("and has a dimension filter set to None", func() {
@@ -208,7 +207,6 @@ func TestAppInsightsPluginRoutes(t *testing.T) {
}
})
}
}
func TestInsightsDimensionsUnmarshalJSON(t *testing.T) {
@@ -124,7 +124,6 @@ func valFromLeafAP(ap map[string]interface{}, metric, agg string) (*float64, err
metMap, ok := met.(map[string]interface{})
if !ok {
return nil, fmt.Errorf("unexpected type for additional properties not found in leaf segment, want map[string]interface{}, but got %T", met)
}
metVal, ok := metMap[agg]
if !ok {
@@ -113,10 +113,8 @@ func TestInsightsMetricsResultToFrame(t *testing.T) {
if diff := cmp.Diff(tt.expectedFrame(), frame, data.FrameTestCompareOptions()...); diff != "" {
t.Errorf("Result mismatch (-want +got):\n%s", diff)
}
})
}
}
func loadInsightsMetricsResponse(name string) (MetricsResult, error) {
@@ -154,5 +154,4 @@ func TestPluginRoutes(t *testing.T) {
}
})
}
}
@@ -131,10 +131,8 @@ func TestLogTableToFrame(t *testing.T) {
if diff := cmp.Diff(tt.expectedFrame(), frame, data.FrameTestCompareOptions()...); diff != "" {
t.Errorf("Result mismatch (-want +got):\n%s", diff)
}
})
}
}
func loadLogAnalyticsTestFileWithNumber(name string) (AzureLogAnalyticsResponse, error) {
@@ -89,7 +89,6 @@ func (e *InsightsAnalyticsDatasource) buildQueries(queries []*tsdb.Query, timeRa
qm.Target = qm.Params.Encode()
iaQueries = append(iaQueries, &qm)
}
return iaQueries, nil
-1
View File
@@ -174,7 +174,6 @@ func (s *InsightsDimensions) UnmarshalJSON(data []byte) error {
err := json.Unmarshal(data, &str)
if err != nil {
return fmt.Errorf("could not parse %q as string or array: %w", string(data), err)
}
if str != "" {
*s = InsightsDimensions{str}
-1
View File
@@ -17,7 +17,6 @@ type urlBuilder struct {
// Build checks the metric definition property to see which form of the url
// should be returned
func (ub *urlBuilder) Build() string {
subscription := ub.Subscription
if ub.Subscription == "" {
@@ -8,7 +8,6 @@ import (
func TestURLBuilder(t *testing.T) {
Convey("AzureMonitor URL Builder", t, func() {
Convey("when metric definition is in the short form", func() {
ub := &urlBuilder{
DefaultSubscription: "default-sub",