MCPcopy Index your code
hub / github.com/microsoft/retina / TestGenerateDropScriptTableOutput

Function TestGenerateDropScriptTableOutput

shell/tracescript_test.go:240–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

238}
239
240func TestGenerateDropScriptTableOutput(t *testing.T) {
241 config := TraceConfig{
242 EnableDrops: true,
243 EnableRST: true,
244 EnableErrors: true,
245 EnableRetransmits: true,
246 }
247
248 gen := NewScriptGenerator(config)
249 script := gen.Generate()
250
251 // Table output should have header
252 if !strings.Contains(script, "TIME") {
253 t.Error("table script missing TIME header")
254 }
255 if !strings.Contains(script, "TYPE") {
256 t.Error("table script missing TYPE header")
257 }
258 if !strings.Contains(script, "REASON") {
259 t.Error("table script missing REASON header")
260 }
261 if !strings.Contains(script, "STATE") {
262 t.Error("table script missing STATE header")
263 }
264 if !strings.Contains(script, "PROBE") {
265 t.Error("table script missing PROBE header")
266 }
267}
268
269func TestScriptGeneratorNoUserStringInterpolation(t *testing.T) {
270 // SECURITY TEST: Verify that user-provided values are never

Callers

nothing calls this directly

Calls 4

GenerateMethod · 0.95
NewScriptGeneratorFunction · 0.85
ContainsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected