Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,10 @@ describe('AuthenticationMethodSelectionStep', () => {
expect(context.authenticationMethod).toBe('rawKeys');
});

it('defaults to rawKeys without prompting when MSI is disabled', () => {
context.enabled = true;
it('does not prompt when Azure connectors are disabled', () => {
context.enabled = false;

expect(new AuthenticationMethodSelectionStep().shouldPrompt(context)).toBe(false);
expect(context.authenticationMethod).toBe('rawKeys');
});

it('does not override an already-set authentication method', () => {
context.enabled = true;
context.authenticationMethod = 'managedServiceIdentity';

expect(new AuthenticationMethodSelectionStep().shouldPrompt(context)).toBe(false);
expect(context.authenticationMethod).toBe('managedServiceIdentity');
});
Comment thread
andrew-eldridge marked this conversation as resolved.

it('rethrows non-cancellation errors', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,8 @@ export class AuthenticationMethodSelectionStep<

/**
* Determines if this step should prompt again (only if no method is selected yet).
*
* TODO: MSI option is temporarily disabled until functions extension fix deployed — always default to rawKeys.
*/
public shouldPrompt(context: T): boolean {
if (context.enabled === true && context.authenticationMethod === undefined) {
context.authenticationMethod = 'rawKeys';
}
return false;
return context.enabled === true && context.authenticationMethod === undefined;
}
}
Loading