Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix acctests in api management #12173

Merged
merged 13 commits into from
Jun 11, 2021
Merged
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 @@ -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