(t *testing.T, appV2 bool)
| 294 | } |
| 295 | |
| 296 | func testScrapeReportMetadata(t *testing.T, appV2 bool) { |
| 297 | appTest := teststorage.NewAppendable() |
| 298 | sl, _ := newTestScrapeLoop(t, withAppendable(appTest, appV2)) |
| 299 | app := sl.appender() |
| 300 | |
| 301 | now := time.Now() |
| 302 | require.NoError(t, sl.report(app, now, 2*time.Second, 1, 1, 1, 512, nil)) |
| 303 | require.NoError(t, app.Commit()) |
| 304 | teststorage.RequireEqual(t, []sample{ |
| 305 | {L: labels.FromStrings("__name__", "up"), M: scrapeHealthMetric.Metadata}, |
| 306 | {L: labels.FromStrings("__name__", "scrape_duration_seconds"), M: scrapeDurationMetric.Metadata}, |
| 307 | {L: labels.FromStrings("__name__", "scrape_samples_scraped"), M: scrapeSamplesMetric.Metadata}, |
| 308 | {L: labels.FromStrings("__name__", "scrape_samples_post_metric_relabeling"), M: samplesPostRelabelMetric.Metadata}, |
| 309 | {L: labels.FromStrings("__name__", "scrape_series_added"), M: scrapeSeriesAddedMetric.Metadata}, |
| 310 | }, appTest.ResultMetadata()) |
| 311 | } |
| 312 | |
| 313 | func TestIsSeriesPartOfFamily(t *testing.T) { |
| 314 | t.Run("counter", func(t *testing.T) { |
no test coverage detected
searching dependent graphs…