Skip to content

Commit 8f63843

Browse files
committed
Test runner supports CCA with oidc_authority
1 parent 6e9c707 commit 8f63843

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

tests/smile.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,13 @@ def _create_confidential_client_app(self, params: Dict[str, Any]) -> Any:
108108
"""Create a ConfidentialClientApplication instance."""
109109
if not params or 'client_id' not in params or 'client_credential' not in params:
110110
raise ValueError("ConfidentialClientApplication requires client_id and client_credential")
111-
112-
client_id = params.get('client_id')
113-
client_credential = params.get('client_credential')
114-
authority = params.get('authority')
115-
logger.debug(f"Creating ConfidentialClientApplication with client_id: {client_id}, authority: {authority}")
116-
117-
kwargs = {'client_id': client_id, 'client_credential': client_credential}
118-
if authority:
119-
kwargs['authority'] = authority
120-
111+
kwargs = {
112+
"client_id": params.get('client_id'),
113+
"client_credential": params.get('client_credential'),
114+
"authority": params.get('authority'),
115+
"oidc_authority": params.get('oidc_authority'),
116+
}
117+
logger.debug(f"Creating ConfidentialClientApplication with {kwargs}")
121118
return msal.ConfidentialClientApplication(**kwargs)
122119

123120
def execute_steps(self) -> bool:
@@ -148,7 +145,8 @@ def _execute_action(self, act_spec: Dict[str, Any]) -> Any:
148145

149146
var_name = parts[0]
150147
method_name = { # Map the method names in yml to actual method names
151-
"AcquireTokenForManagedIdentity": "acquire_token_for_client",
148+
"AcquireTokenForManagedIdentity": "acquire_token_for_client", # For ManagedIdentityClient
149+
"AcquireTokenForClient": "acquire_token_for_client", # For ConfidentialClientApplication
152150
}.get(parts[1])
153151

154152
if method_name is None:

0 commit comments

Comments
 (0)