|
24 | 24 | dict(_bypass_instrumentation_for_waf=False, _asm_enabled=True, _iast_enabled=False), |
25 | 25 | ) |
26 | 26 |
|
27 | | -PATCH_SPECIALS = (dict(_remote_config_enabled=True),) |
28 | | - |
29 | 27 | PATCH_DISABLED_CONFIGURATIONS = ( |
30 | | - dict(), |
31 | | - dict(_asm_enabled=False), |
32 | | - dict(_iast_enabled=True), |
33 | | - dict(_iast_enabled=False), |
34 | | - dict(_asm_enabled=False, _iast_enabled=True), |
35 | | - dict(_remote_config_enabled=False), |
36 | | - dict(_remote_config_enabled=False, _iast_enabled=True), |
37 | | - dict(_asm_enabled=False, _iast_enabled=False), |
38 | 28 | dict(_bypass_instrumentation_for_waf=True, _asm_enabled=False, _iast_enabled=False), |
39 | 29 | dict(_bypass_instrumentation_for_waf=True), |
40 | | - dict(_bypass_instrumentation_for_waf=False, _asm_enabled=False, _iast_enabled=False), |
41 | | - dict(_bypass_instrumentation_for_waf=True, _asm_enabled=True, _iast_enabled=False), |
42 | 30 | dict(_bypass_instrumentation_for_waf=True, _asm_enabled=False, _iast_enabled=True), |
43 | 31 | dict(_bypass_instrumentation_for_waf=False, _asm_enabled=False, _iast_enabled=True), |
44 | 32 | ) |
@@ -250,27 +238,21 @@ def test_ossystem(tracer, config): |
250 | 238 | assert span.get_tag(COMMANDS.COMPONENT) == "os" |
251 | 239 |
|
252 | 240 |
|
253 | | -@pytest.mark.parametrize("config", PATCH_DISABLED_CONFIGURATIONS + PATCH_SPECIALS) |
| 241 | +@pytest.mark.parametrize("config", PATCH_DISABLED_CONFIGURATIONS) |
254 | 242 | def test_ossystem_disabled(tracer, config): |
255 | 243 | with override_global_config(config): |
256 | 244 | patch() |
257 | 245 | pin = Pin.get_from(os) |
258 | | - # TODO(APPSEC-57964): PIN is None in GitLab with py3.12 and this config: |
259 | | - # {'_asm_enabled': False, '_bypass_instrumentation_for_waf': False, '_iast_enabled': False} |
260 | | - if pin: |
261 | | - pin._clone(tracer=tracer).onto(os) |
| 246 | + pin._clone(tracer=tracer).onto(os) |
262 | 247 | with tracer.trace("ossystem_test"): |
263 | 248 | ret = os.system("dir -l /") |
264 | 249 | assert ret == 0 |
265 | 250 |
|
266 | 251 | spans = tracer.pop() |
267 | 252 | assert spans |
268 | | - # TODO(APPSEC-57964): GitLab with py3.12 returns two spans for those configurations. |
269 | | - # Is override_global_config not triggering a restart? |
270 | | - # {'_remote_config_enabled': True} |
271 | | - # {'_remote_config_enabled': False} |
272 | | - # {'_iast_enabled': False} |
273 | | - assert len(spans) >= 1 |
| 253 | + num_spans = 1 |
| 254 | + |
| 255 | + assert len(spans) == num_spans |
274 | 256 | _assert_root_span_empty_system_data(spans[0]) |
275 | 257 |
|
276 | 258 |
|
|
0 commit comments