Skip to content

Commit

Permalink
Fix UCP test (radius-project#7694)
Browse files Browse the repository at this point in the history
# Description

looks like radius-project#7640 broke one
of the ucp tests. this PR fixes the test

<img width="304" alt="image"
src="https://github.com/radius-project/radius/assets/32342549/13a1b083-2de0-426a-ad0d-f5870cb3ee80">


## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #issue_number

---------

Signed-off-by: willdavsmith <[email protected]>
  • Loading branch information
willdavsmith authored Jun 19, 2024
1 parent b748443 commit e7a4ec9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/cli/credential/azure_credential_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,7 @@ func (cpm *AzureCredentialManagementClient) Get(ctx context.Context, credentialN
return ProviderCredentialConfiguration{}, err
}

azureCredential, ok := resp.AzureCredentialResource.Properties.(*ucp.AzureCredentialProperties)
if !ok {
return ProviderCredentialConfiguration{}, clierrors.Message("Unable to find credentials for cloud provider %s.", AzureCredential)
}

azureCredentialKind := azureCredential.GetAzureCredentialProperties().Kind

switch *azureCredentialKind {
switch *resp.AzureCredentialResource.Properties.GetAzureCredentialProperties().Kind {
case ucp.AzureCredentialKindServicePrincipal:
azureServicePrincipal, ok := resp.AzureCredentialResource.Properties.(*ucp.AzureServicePrincipalProperties)
if !ok {
Expand Down

0 comments on commit e7a4ec9

Please sign in to comment.