Commit cb1ac56
authored
feat: added integration tests for auto org (#1052)
* feat: added integration tests for auto org
* fix: added integration tests for folder org for code and test refactor
* fix: use valid uuids for org
* fix: update the integration tests for folder org
* fix: add test for multiple folders with orgs for feature flags
* fix: add folder org tests for autofix
* fix: add folder org test for sarif
* fix: use IntegTest for integration tests
* fix: allow sast scans to run in test
* fix: handle explain endpoint returnm error in integration tests
* fix: revert removal av sast checks
* fix: make tests use the new setupWorkspace function
* fix: removed NewMockCodeIssue as it is no longer being used
* fix: make NewMockIssues available for tests outside of workspace
* fix: updated integration tests for crud ignroes
All three operations (Create, Edit, Delete) now follow the same integration test pattern:
Full end-to-end execution
Mock engine setup with folder configs
Workflow invocation verification
Consistent structure across all three operations
The tests verify that:
The correct folder-specific org is used in the workflow configuration
The full command execution path works correctly
The workflow is invoked with the expected organization
* fix: refactor to remove code duplication
* fix: fixing review comments
Refactored CLI test utilities: moved executeAndCaptureConfig to a shared
location in testutil to eliminate duplication
Package renaming: renamed workspace package to workspaceutil to avoid
import aliases
Test improvements: enhanced feature flag test to verify cached values,
not just key existence
Code cleanup: removed duplicate functions, unused imports, and improved
test structure
* fix: replace testutils.SetupFakeWorkspace with workspaceutil.SetupWorkspace
* fix: updated integration test for Test_CodeConfig_FallsBackToGlobalOrg
* fix: update integration test for Test_CodeConfig_UsesFolderOrganization
* fix: removed Test_GetCodeApiUrlForFolder_UsesFolderOrganization since it is covered by the new integration test
* fix: refactored the rest of the tests in code integration tests
* fix: move unit tests from integration test files
* fix: cleanup tests
* fix: fix test to use imagecache1 parent 659b8a9 commit cb1ac56
File tree
23 files changed
+1263
-277
lines changed- application
- codeaction
- server
- domain/ide
- command
- testutils
- workspace
- infrastructure
- cli
- code
- featureflag
- internal/testutil
- workspaceutil
23 files changed
+1263
-277
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | | - | |
37 | 33 | | |
38 | 34 | | |
39 | 35 | | |
40 | | - | |
41 | 36 | | |
| 37 | + | |
42 | 38 | | |
43 | 39 | | |
44 | 40 | | |
| |||
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 55 | | |
81 | 56 | | |
82 | 57 | | |
| |||
124 | 99 | | |
125 | 100 | | |
126 | 101 | | |
127 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
128 | 105 | | |
129 | 106 | | |
130 | 107 | | |
| |||
297 | 274 | | |
298 | 275 | | |
299 | 276 | | |
300 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
301 | 280 | | |
302 | 281 | | |
303 | 282 | | |
| |||
311 | 290 | | |
312 | 291 | | |
313 | 292 | | |
314 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
315 | 296 | | |
316 | 297 | | |
317 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
| 62 | + | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 27 | | |
33 | 28 | | |
34 | | - | |
35 | | - | |
36 | 29 | | |
| 30 | + | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
| |||
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
86 | | - | |
| 80 | + | |
87 | 81 | | |
88 | 82 | | |
89 | 83 | | |
| |||
102 | 96 | | |
103 | 97 | | |
104 | 98 | | |
105 | | - | |
| 99 | + | |
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
| |||
134 | 128 | | |
135 | 129 | | |
136 | 130 | | |
137 | | - | |
| 131 | + | |
138 | 132 | | |
139 | 133 | | |
140 | 134 | | |
| |||
166 | 160 | | |
167 | 161 | | |
168 | 162 | | |
169 | | - | |
| 163 | + | |
170 | 164 | | |
171 | 165 | | |
172 | 166 | | |
| |||
208 | 202 | | |
209 | 203 | | |
210 | 204 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | | - | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
279 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
0 commit comments