Skip to content

Commit

Permalink
use new helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jcscottiii committed Jan 24, 2025
1 parent 1665589 commit 29e8f21
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/pkg/httpserver/get_feature_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestGetFeatureMetadata(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: mockMetadataStorer}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
// TODO: Start tracking call count and assert call count.
})
}
}
2 changes: 2 additions & 0 deletions backend/pkg/httpserver/get_feature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ func TestGetFeature(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountGetFeature,
"GetFeature")
})
}
}
1 change: 1 addition & 0 deletions backend/pkg/httpserver/get_features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ func TestListFeatures(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountFeaturesSearch, "FeaturesSearch")
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func TestListAggregatedFeatureSupport(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountListBrowserFeatureCountMetric,
"ListBrowserFeatureCountMetric")

})
}
}
2 changes: 2 additions & 0 deletions backend/pkg/httpserver/list_aggregated_wpt_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ func TestListAggregatedWPTMetrics(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountListMetricsOverTimeWithAggregatedTotals,
"ListMetricsOverTimeWithAggregatedTotals")
})
}
}
2 changes: 2 additions & 0 deletions backend/pkg/httpserver/list_chromium_usage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func TestListChromiumDailyUsageStats(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountListChromiumDailyUsageStats,
"ListChromiumDailyUsageStats")
})
}
}
2 changes: 2 additions & 0 deletions backend/pkg/httpserver/list_feature_wpt_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ func TestListFeatureWPTMetrics(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountListMetricsForFeatureIDBrowserAndChannel,
"ListMetricsForFeatureIDBrowserAndChannel")
})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ func TestListMissingOneImplemenationCounts(t *testing.T) {
}
myServer := Server{wptMetricsStorer: mockStorer, metadataStorer: nil}
assertTestServerRequest(t, &myServer, tc.request, tc.expectedResponse)
assertMockCallCount(t, tc.expectedCallCount, mockStorer.callCountListMissingOneImplCounts,
"ListMissingOneImplCounts")
})
}
}

0 comments on commit 29e8f21

Please sign in to comment.