MCPcopy
hub / github.com/grafana/tempo / TestPanics

Function TestPanics

pkg/usagestats/stats_test.go:167–207  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

165}
166
167func TestPanics(t *testing.T) {
168 require.Panics(t, func() {
169 NewStatistics("panicstats")
170 NewWordCounter("panicstats")
171 })
172
173 require.Panics(t, func() {
174 NewWordCounter("panicwordcounter")
175 NewCounter("panicwordcounter")
176 })
177
178 require.Panics(t, func() {
179 NewCounter("paniccounter")
180 NewStatistics("paniccounter")
181 })
182
183 require.Panics(t, func() {
184 NewFloat("panicfloat")
185 NewInt("panicfloat")
186 })
187
188 require.Panics(t, func() {
189 NewInt("panicint")
190 NewString("panicint")
191 })
192
193 require.Panics(t, func() {
194 NewString("panicstring")
195 NewFloat("panicstring")
196 })
197
198 require.Panics(t, func() {
199 NewFloat(targetKey)
200 Target("new target")
201 })
202
203 require.Panics(t, func() {
204 NewFloat(editionKey)
205 Edition("new edition")
206 })
207}

Callers

nothing calls this directly

Calls 8

NewStatisticsFunction · 0.85
NewWordCounterFunction · 0.85
NewCounterFunction · 0.85
NewFloatFunction · 0.85
NewIntFunction · 0.85
NewStringFunction · 0.85
TargetFunction · 0.85
EditionFunction · 0.85

Tested by

no test coverage detected