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

Function TestBuildInputSchemaRequiredInputs

pkg/workflow/build_input_schema_test.go:140–156  ·  view source on GitHub ↗

TestBuildInputSchemaRequiredInputs tests required field tracking.

(t *testing.T)

Source from the content-addressed store, hash-verified

138
139// TestBuildInputSchemaRequiredInputs tests required field tracking.
140func TestBuildInputSchemaRequiredInputs(t *testing.T) {
141 inputs := map[string]any{
142 "name": map[string]any{
143 "type": "string",
144 "required": true,
145 },
146 "optional": map[string]any{
147 "type": "string",
148 "required": false,
149 },
150 }
151
152 _, required := buildInputSchema(inputs, defaultDescFn)
153
154 assert.Contains(t, required, "name", "name should be required")
155 assert.NotContains(t, required, "optional", "optional should not be required")
156}
157
158// TestBuildInputSchemaRequiredSorting tests that required list order is deterministic
159// across multiple runs (callers typically sort the result).

Callers

nothing calls this directly

Calls 1

buildInputSchemaFunction · 0.85

Tested by

no test coverage detected