(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestGitHubToolConfigLockdownParsing(t *testing.T) { |
| 67 | tests := []struct { |
| 68 | name string |
| 69 | config map[string]any |
| 70 | expected bool |
| 71 | }{ |
| 72 | { |
| 73 | name: "lockdown true in config", |
| 74 | config: map[string]any{ |
| 75 | "lockdown": true, |
| 76 | "mode": "local", |
| 77 | }, |
| 78 | expected: true, |
| 79 | }, |
| 80 | { |
| 81 | name: "lockdown false in config", |
| 82 | config: map[string]any{ |
| 83 | "lockdown": false, |
| 84 | "mode": "remote", |
| 85 | }, |
| 86 | expected: false, |
| 87 | }, |
| 88 | { |
| 89 | name: "lockdown not present", |
| 90 | config: map[string]any{ |
| 91 | "mode": "local", |
| 92 | }, |
| 93 | expected: false, |
| 94 | }, |
| 95 | } |
| 96 | |
| 97 | for _, tt := range tests { |
| 98 | t.Run(tt.name, func(t *testing.T) { |
| 99 | parsed := parseGitHubTool(tt.config) |
| 100 | if parsed.Lockdown != tt.expected { |
| 101 | t.Errorf("parseGitHubTool().Lockdown = %v, want %v", parsed.Lockdown, tt.expected) |
| 102 | } |
| 103 | }) |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | func TestRenderGitHubMCPDockerConfigWithLockdown(t *testing.T) { |
| 108 | tests := []struct { |
nothing calls this directly
no test coverage detected