(t *testing.T, app compatAppendable, appV2 bool, injectNewLoop func(options scrapeLoopOptions) loop)
| 141 | } |
| 142 | |
| 143 | func newTestScrapePool(t *testing.T, app compatAppendable, appV2 bool, injectNewLoop func(options scrapeLoopOptions) loop) *scrapePool { |
| 144 | sa := selectAppendable(app, appV2) |
| 145 | return &scrapePool{ |
| 146 | ctx: t.Context(), |
| 147 | cancel: func() {}, |
| 148 | logger: promslog.NewNopLogger(), |
| 149 | config: &config.ScrapeConfig{}, |
| 150 | options: &Options{}, |
| 151 | client: http.DefaultClient, |
| 152 | |
| 153 | activeTargets: map[uint64]*Target{}, |
| 154 | loops: map[uint64]loop{}, |
| 155 | injectTestNewLoop: injectNewLoop, |
| 156 | |
| 157 | appendable: sa.V1(), appendableV2: sa.V2(), |
| 158 | |
| 159 | symbolTable: labels.NewSymbolTable(), |
| 160 | metrics: newTestScrapeMetrics(t), |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | // protoMarshalDelimited marshals a MetricFamily into a delimited |
| 165 | // Prometheus proto exposition format bytes (known as `encoding=delimited`) |
no test coverage detected
searching dependent graphs…