@@ -74,8 +74,8 @@ def test_resolve_feature_flags_ga_enabled_via_env(monkeypatch):
7474 # Action
7575 result = feature_gating_helpers .resolve_feature_flags (
7676 env_var = "GOOGLE_SDK_PYTHON_TRACING_ENABLED" ,
77- provider_key = "tracer_provider" ,
78- client_options = None ,
77+ feature_key = "tracer_provider" ,
78+ configuration = None ,
7979 )
8080
8181 # Assertion
@@ -96,26 +96,26 @@ def test_resolve_feature_flags_exp_blocked_with_provider_fails_fast(
9696 monkeypatch .delenv (
9797 "GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" , raising = False
9898 )
99- client_options = {"tracer_provider" : object ()}
99+ configuration = {"tracer_provider" : object ()}
100100
101101 # Action & Assertion
102102 with pytest .raises (ValueError , match = "Experimental feature" ):
103103 feature_gating_helpers .resolve_feature_flags (
104104 env_var = "GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" ,
105- provider_key = "tracer_provider" ,
106- client_options = client_options ,
105+ feature_key = "tracer_provider" ,
106+ configuration = configuration ,
107107 )
108108
109109
110110def test_resolve_feature_flags_exp_enabled_with_provider (monkeypatch ):
111111 """Verify that experimental feature is enabled if the experimental environment variable is enabled and a provider is provided."""
112112 monkeypatch .setenv ("GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" , "true" )
113- client_options = {"tracer_provider" : object ()}
113+ configuration = {"tracer_provider" : object ()}
114114
115115 result = feature_gating_helpers .resolve_feature_flags (
116116 env_var = "GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" ,
117- provider_key = "tracer_provider" ,
118- client_options = client_options ,
117+ feature_key = "tracer_provider" ,
118+ configuration = configuration ,
119119 )
120120 assert result is True
121121
@@ -126,8 +126,8 @@ def test_resolve_feature_flags_exp_enabled_without_provider(monkeypatch):
126126
127127 result = feature_gating_helpers .resolve_feature_flags (
128128 env_var = "GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" ,
129- provider_key = "tracer_provider" ,
130- client_options = None ,
129+ feature_key = "tracer_provider" ,
130+ configuration = None ,
131131 )
132132 assert result is True
133133
@@ -138,8 +138,8 @@ def test_resolve_feature_flags_exp_disabled_without_provider(monkeypatch):
138138
139139 result = feature_gating_helpers .resolve_feature_flags (
140140 env_var = "GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" ,
141- provider_key = "tracer_provider" ,
142- client_options = None ,
141+ feature_key = "tracer_provider" ,
142+ configuration = None ,
143143 )
144144 assert result is False
145145
@@ -148,12 +148,12 @@ def test_resolve_feature_flags_ga_enabled_via_provider(monkeypatch):
148148 """Verify that a GA feature is enabled if a provider is provided, ignoring the environment variable."""
149149 # Env var is False, but provider is present
150150 monkeypatch .setenv ("GOOGLE_SDK_PYTHON_TRACING_ENABLED" , "false" )
151- client_options = {"tracer_provider" : object ()}
151+ configuration = {"tracer_provider" : object ()}
152152
153153 result = feature_gating_helpers .resolve_feature_flags (
154154 env_var = "GOOGLE_SDK_PYTHON_TRACING_ENABLED" ,
155- provider_key = "tracer_provider" ,
156- client_options = client_options ,
155+ feature_key = "tracer_provider" ,
156+ configuration = configuration ,
157157 )
158158 assert result is True
159159
@@ -169,8 +169,8 @@ def test_resolve_feature_flags_ga_fallback_to_false(monkeypatch, env_val):
169169 monkeypatch .delenv ("GOOGLE_SDK_PYTHON_TRACING_ENABLED" , raising = False )
170170 result = feature_gating_helpers .resolve_feature_flags (
171171 env_var = "GOOGLE_SDK_PYTHON_TRACING_ENABLED" ,
172- provider_key = "tracer_provider" ,
173- client_options = None ,
172+ feature_key = "tracer_provider" ,
173+ configuration = None ,
174174 )
175175 assert result is False
176176
@@ -181,19 +181,19 @@ def __init__(self):
181181
182182
183183@pytest .mark .parametrize (
184- "client_options " ,
184+ "configuration " ,
185185 [
186186 {"other_option" : "value" },
187187 _MockOptions (),
188188 ],
189189 ids = ["dict_without_key" , "object_without_key" ],
190190)
191- def test_resolve_feature_flags_options_without_key (client_options ):
192- """Verify behavior when client_options is present but missing the provider key."""
191+ def test_resolve_feature_flags_options_without_key (configuration ):
192+ """Verify behavior when configuration is present but missing the provider key."""
193193 # GA Path: should fall through to env var / fallback
194194 result = feature_gating_helpers .resolve_feature_flags (
195195 env_var = "GOOGLE_SDK_PYTHON_TRACING_ENABLED" ,
196- provider_key = "tracer_provider" ,
197- client_options = client_options ,
196+ feature_key = "tracer_provider" ,
197+ configuration = configuration ,
198198 )
199199 assert result is False
0 commit comments