initializeDaggerOnce initializes Dagger client once for all tests
(t *testing.T)
| 153 | |
| 154 | // initializeDaggerOnce initializes Dagger client once for all tests |
| 155 | func initializeDaggerOnce(t *testing.T) { |
| 156 | daggerOnce.Do(func() { |
| 157 | if testDaggerClient != nil { |
| 158 | return |
| 159 | } |
| 160 | |
| 161 | ctx := context.Background() |
| 162 | client, err := dagger.Connect(ctx) |
| 163 | if err != nil { |
| 164 | daggerErr = err |
| 165 | return |
| 166 | } |
| 167 | |
| 168 | testDaggerClient = client |
| 169 | }) |
| 170 | |
| 171 | if daggerErr != nil { |
| 172 | t.Skipf("Skipping test - Dagger not available: %v", daggerErr) |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | // UserActions provides test helpers that mirror MCP tool behavior exactly |
| 177 | // These represent what a user would experience when using the MCP tools |
no outgoing calls