@@ -60,6 +60,9 @@ def _test_as_list(env_key, conf_key, default):
60
60
* _test_as_bool ("DD_LOGS_INJECTION" , "logs_injection" , default = True ),
61
61
* _test_as_bool ("DD_TRACE_ENABLED" , "trace_enabled" , default = True ),
62
62
* _test_as_bool ("DD_COLD_START_TRACING" , "cold_start_tracing" , default = True ),
63
+ * _test_as_bool ("DD_TRACE_MANAGED_SERVICES" , "make_inferred_span" , default = True ),
64
+ * _test_as_bool ("DD_ENCODE_AUTHORIZER_CONTEXT" , "encode_authorizer_context" , default = True ),
65
+ * _test_as_bool ("DD_DECODE_AUTHORIZER_CONTEXT" , "decode_authorizer_context" , default = True ),
63
66
* _test_as_bool ("DD_FLUSH_IN_THREAD" , "flush_in_thread" , default = False ),
64
67
* _test_as_bool ("DD_ENHANCED_METRICS" , "enhanced_metrics_enabled" , default = True ),
65
68
* _test_as_bool ("DD_INTEGRATION_TEST" , "integration_test" , default = False ),
@@ -118,23 +121,20 @@ def test_config_from_environ(env_key, conf_key, env_val, conf_val, setenv):
118
121
119
122
120
123
_test_config_from_environ_depends_on_tracing = (
124
+ * _test_as_bool ("DD_COLD_START_TRACING" , "cold_start_tracing" , default = True ),
121
125
* _test_as_bool ("DD_TRACE_MANAGED_SERVICES" , "make_inferred_span" , default = True ),
126
+ * _test_as_bool ("DD_ENCODE_AUTHORIZER_CONTEXT" , "encode_authorizer_context" , default = True ),
127
+ * _test_as_bool ("DD_DECODE_AUTHORIZER_CONTEXT" , "decode_authorizer_context" , default = True ),
122
128
)
123
129
124
130
125
131
@pytest .mark .parametrize (
126
132
"env_key,conf_key,env_val,conf_val" , _test_config_from_environ_depends_on_tracing
127
133
)
128
- @pytest .mark .parametrize ("trace_enabled" , [True , False ])
129
- def test_config_from_environ_depends_on_tracing (
130
- env_key , conf_key , env_val , conf_val , setenv , trace_enabled
131
- ):
134
+ def test_config_from_environ_depends_on_tracing (env_key , conf_key , env_val , conf_val , setenv ):
132
135
setenv (env_key , env_val )
133
- setenv ("DD_TRACE_ENABLED" , "true" if trace_enabled else "false" )
134
- if trace_enabled :
135
- assert getattr (config , conf_key ) is conf_val
136
- else :
137
- assert getattr (config , conf_key ) is False
136
+ setenv ("DD_TRACE_ENABLED" , "false" )
137
+ assert getattr (config , conf_key ) is False
138
138
139
139
140
140
_test_fips_mode_from_environ = (
0 commit comments