TestRepoMemoryMaxPatchSizeDefault tests that max-patch-size defaults to 10KB
(t *testing.T)
| 671 | |
| 672 | // TestRepoMemoryMaxPatchSizeDefault tests that max-patch-size defaults to 10KB |
| 673 | func 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 |
| 691 | func TestRepoMemoryMaxPatchSizeValidation(t *testing.T) { |
nothing calls this directly
no test coverage detected