MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_JobNames_Values

Function TestSpec_JobNames_Values

pkg/constants/spec_test.go:333–357  ·  view source on GitHub ↗

TestSpec_JobNames_Values validates the documented job name constant values. Spec section: "### Job Names"

(t *testing.T)

Source from the content-addressed store, hash-verified

331// TestSpec_JobNames_Values validates the documented job name constant values.
332// Spec section: "### Job Names"
333func TestSpec_JobNames_Values(t *testing.T) {
334 tests := []struct {
335 name string
336 constant constants.JobName
337 expected string
338 }{
339 // From spec: AgentJobName // "agent"
340 {name: "AgentJobName", constant: constants.AgentJobName, expected: "agent"},
341 // From spec: ActivationJobName // "activation"
342 {name: "ActivationJobName", constant: constants.ActivationJobName, expected: "activation"},
343 // From spec: DetectionJobName // "detection"
344 {name: "DetectionJobName", constant: constants.DetectionJobName, expected: "detection"},
345 // From spec: ConclusionJobName // "conclusion"
346 {name: "ConclusionJobName", constant: constants.ConclusionJobName, expected: "conclusion"},
347 }
348
349 for _, tt := range tests {
350 t.Run(tt.name, func(t *testing.T) {
351 assert.Equal(t, tt.expected, tt.constant.String(),
352 "job name %s should have documented value %q", tt.name, tt.expected)
353 assert.True(t, tt.constant.IsValid(),
354 "documented job name %s should report IsValid() = true", tt.name)
355 })
356 }
357}
358
359// TestSpec_VersionConstraints_MinVersionValues validates the documented minimum version constraints.
360// Spec section: "### Minimum Version Constraints"

Callers

nothing calls this directly

Calls 3

RunMethod · 0.45
StringMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected