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

Function TestRepoMemoryMaxPatchSizeDefault

pkg/workflow/repo_memory_test.go:673–688  ·  view source on GitHub ↗

TestRepoMemoryMaxPatchSizeDefault tests that max-patch-size defaults to 10KB

(t *testing.T)

Source from the content-addressed store, hash-verified

671
672// TestRepoMemoryMaxPatchSizeDefault tests that max-patch-size defaults to 10KB
673func TestRepoMemoryMaxPatchSizeDefault(t *testing.T) {
674 toolsMap := map[string]any{
675 "repo-memory": true,
676 }
677
678 toolsConfig, err := ParseToolsConfig(toolsMap)
679 require.NoError(t, err, "Should parse tools config")
680
681 compiler := NewCompiler()
682 config, err := compiler.extractRepoMemoryConfig(toolsConfig, "my-workflow")
683 require.NoError(t, err, "Should extract repo-memory config")
684 require.NotNil(t, config, "Config should not be nil")
685 require.Len(t, config.Memories, 1, "Should have 1 memory")
686
687 assert.Equal(t, 10240, config.Memories[0].MaxPatchSize, "Default max patch size should be 10240 bytes (10KB)")
688}
689
690// TestRepoMemoryMaxPatchSizeValidation tests max-patch-size boundary validation
691func TestRepoMemoryMaxPatchSizeValidation(t *testing.T) {

Callers

nothing calls this directly

Calls 3

ParseToolsConfigFunction · 0.85
NewCompilerFunction · 0.85

Tested by

no test coverage detected