Skip to content

Commit

Permalink
Fix acctests in api management (#12173)
Browse files Browse the repository at this point in the history
  • Loading branch information
yupwei68 authored Jun 11, 2021
1 parent cf66263 commit b5860d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resource "azurerm_api_management_api_schema" "test" {
resource_group_name = azurerm_api_management_api.test.resource_group_name
schema_id = "acctestSchema%d"
content_type = "application/vnd.ms-azure-apim.xsd+xml"
value = file("testdata/api_management_api_pluginsdk.xml")
value = file("testdata/api_management_api_schema.xml")
}
`, r.template(data), data.RandomInteger)
}
Expand All @@ -84,12 +84,12 @@ func (r ApiManagementApiSchemaResource) requiresImport(data acceptance.TestData)
%s
resource "azurerm_api_management_api_schema" "import" {
api_name = azurerm_api_management_api_pluginsdk.test.api_name
api_management_name = azurerm_api_management_api_pluginsdk.test.api_management_name
resource_group_name = azurerm_api_management_api_pluginsdk.test.resource_group_name
schema_id = azurerm_api_management_api_pluginsdk.test.schema_id
content_type = azurerm_api_management_api_pluginsdk.test.content_type
value = azurerm_api_management_api_pluginsdk.test.value
api_name = azurerm_api_management_api_schema.test.api_name
api_management_name = azurerm_api_management_api_schema.test.api_management_name
resource_group_name = azurerm_api_management_api_schema.test.resource_group_name
schema_id = azurerm_api_management_api_schema.test.schema_id
content_type = azurerm_api_management_api_schema.test.content_type
value = azurerm_api_management_api_schema.test.value
}
`, r.basic(data))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestAccApiManagementLogger_basicApplicationInsights(t *testing.T) {
ResourceName: data.ResourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.instrumentation_key"},
ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.instrumentation_key", "application_insights.0.%"},
},
})
}
Expand All @@ -104,7 +104,7 @@ func TestAccApiManagementLogger_complete(t *testing.T) {
ResourceName: data.ResourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.instrumentation_key"},
ImportStateVerifyIgnore: []string{"application_insights.#", "application_insights.0.instrumentation_key", "application_insights.0.%"},
},
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ resource "azurerm_api_management" "test" {
resource "azurerm_api_management_policy" "test" {
api_management_id = azurerm_api_management.test.id
xml_link = "https://raw.githubusercontent.com/terraform-providers/terraform-provider-azurerm/master/azurerm/internal/services/apimanagement/tests/testdata/api_management_policy_test.xml"
xml_link = "https://raw.githubusercontent.com/terraform-providers/terraform-provider-azurerm/master/azurerm/internal/services/apimanagement/testdata/api_management_policy_test.xml"
}
`, data.RandomInteger, data.Locations.Primary)
}
Expand Down

0 comments on commit b5860d1

Please sign in to comment.