Skip to content
Closed
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 @@ -10,10 +10,10 @@
import com.azure.core.management.Region;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.test.TestBase;
import com.azure.core.test.annotation.DoNotRecord;
import com.azure.core.test.annotation.LiveOnly;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.AzurePowerShellCredentialBuilder;
import com.azure.resourcemanager.providerhub.fluent.models.OperationsDefinitionInner;
import com.azure.resourcemanager.providerhub.models.OperationsContent;
import com.azure.resourcemanager.providerhub.models.OperationsDefinitionDisplay;
Expand All @@ -35,7 +35,7 @@ public class ProviderHubManagerTests extends TestBase {

@Override
public void beforeTest() {
final TokenCredential credential = new DefaultAzureCredentialBuilder().build();
final TokenCredential credential = new AzurePowerShellCredentialBuilder().build();
final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);

providerHubManager = ProviderHubManager
Expand Down Expand Up @@ -66,7 +66,7 @@ protected void afterTest() {
}

@Test
@DoNotRecord(skipInPlayback = true)
@LiveOnly
public void testCreateOperation() {
OperationsContent operationsContent = null;
String spaceName = "Microsoft.Contoso" + randomPadding();
Expand Down
4 changes: 0 additions & 4 deletions sdk/providerhub/test-resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ param testApplicationId string
@description('This is the object id of the service principal used to run tests.')
param testApplicationOid string

@description('The application client secret used to run tests.')
param testApplicationSecret string

var contributorRoleId = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c'

resource contributorRoleId_name 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
Expand All @@ -22,6 +19,5 @@ resource contributorRoleId_name 'Microsoft.Authorization/roleAssignments@2022-04

output AZURE_TENANT_ID string = tenantId
output AZURE_CLIENT_ID string = testApplicationId
output AZURE_CLIENT_SECRET string = testApplicationSecret
output AZURE_SUBSCRIPTION_ID string = subscription().subscriptionId
output AZURE_RESOURCE_GROUP_NAME string = resourceGroup().name
1 change: 1 addition & 0 deletions sdk/providerhub/tests.mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ extends:
groupId: com.azure.resourcemanager
safeName: azureresourcemanagerproviderhub
Clouds: 'Public'
UseFederatedAuth: true
# Only run tests on Windows to save cost.
MatrixFilters:
- pool=.*(win).*