Skip to content

Commit d71029e

Browse files
test(materials): exercise trace_sessions maxLength bound
The TestValidateSecurityContextTraceSessions doc comment claimed per-item maxLength coverage, but the rejected cases only hit maxItems, minLength, and the array type. Add a >256-char session-id case on both commit roles so the maxLength bound is actually exercised. Assisted-by: Claude Code Signed-off-by: Matías Insaurralde <matias@chainloop.dev> Chainloop-Trace-Sessions: 3f365023-61a3-4af3-bbe9-03688f152834, 7cf89fb4-1736-425d-bafb-bfb8b59155a4, df945bde-e982-472c-bb81-50055df403bb
1 parent 325d639 commit d71029e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎internal/schemavalidators/schemavalidators_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ func TestValidateSecurityContextTraceSessions(t *testing.T) {
713713
}{
714714
{name: "more than maxItems session ids", value: overflow},
715715
{name: "an empty-string session id", value: []any{""}},
716+
{name: "a session id longer than maxLength", value: []any{strings.Repeat("a", 257)}},
716717
{name: "a non-array trace_sessions", value: "not-an-array"},
717718
}
718719

0 commit comments

Comments
 (0)