Skip to content

Commit

Permalink
removed tests, as the permissions required for these tests may not be…
Browse files Browse the repository at this point in the history
… available for all developers
  • Loading branch information
Bindewald, André (UIT) authored and Bindewald, André (UIT) committed Aug 14, 2024
1 parent 02dc009 commit 6310e4a
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions internal/services/authorization/role_assignment_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,20 +263,6 @@ func TestAccRoleAssignment_resourceGroupScoped(t *testing.T) {
})
}

func TestAccRoleAssignment_capacityProviderScoped(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_role_assignment", "test")
r := RoleAssignmentResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.capacityProviderScoped(),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep("skip_service_principal_aad_check"),
})
}

func (r RoleAssignmentResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) {
id, err := parse.RoleAssignmentID(state.ID)
if err != nil {
Expand Down Expand Up @@ -641,19 +627,3 @@ resource "azurerm_role_assignment" "test" {
}
`, data.RandomInteger, data.Locations.Primary)
}

func (RoleAssignmentResource) capacityProviderScoped() string {
return `
provider "azurerm" {
features {}
}
data "azurerm_client_config" "test" {}
resource "azurerm_role_assignment" "test" {
scope = "/providers/Microsoft.Capacity"
role_definition_name = "Reservations Reader"
principal_id = data.azurerm_client_config.test.object_id
}
`
}

0 comments on commit 6310e4a

Please sign in to comment.