From ff1dcdb6d0de239fc79f20a53dc8bd414b956b3f Mon Sep 17 00:00:00 2001 From: f-alizada <104755925+f-alizada@users.noreply.github.com> Date: Mon, 13 Jun 2022 12:40:08 +0200 Subject: [PATCH] Remove unused parameters from product template (#743) Co-authored-by: Farhad Alizada --- .../Extractor/EntityExtractors/ProductExtractor.cs | 3 ++- .../Extractor/Scenarios/ProductsExtractorTests.cs | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ArmTemplates/Extractor/EntityExtractors/ProductExtractor.cs b/src/ArmTemplates/Extractor/EntityExtractors/ProductExtractor.cs index 9f75ad7d..ef7885ab 100644 --- a/src/ArmTemplates/Extractor/EntityExtractors/ProductExtractor.cs +++ b/src/ArmTemplates/Extractor/EntityExtractors/ProductExtractor.cs @@ -57,7 +57,8 @@ public async Task> GenerateProductsTemplateAs ExtractorParameters extractorParameters) { var productsTemplate = this.templateBuilder - .GenerateTemplateWithPresetProperties(extractorParameters) + .GenerateTemplateWithApimServiceNameProperty() + .AddPolicyProperties(extractorParameters) .Build(); var products = await this.productsClient.GetAllAsync(extractorParameters); diff --git a/tests/ArmTemplates.Tests/Extractor/Scenarios/ProductsExtractorTests.cs b/tests/ArmTemplates.Tests/Extractor/Scenarios/ProductsExtractorTests.cs index c6472b87..2f033eed 100644 --- a/tests/ArmTemplates.Tests/Extractor/Scenarios/ProductsExtractorTests.cs +++ b/tests/ArmTemplates.Tests/Extractor/Scenarios/ProductsExtractorTests.cs @@ -81,8 +81,6 @@ public async Task GenerateProductsTemplates_ProperlyLaysTheInformation() templateParameters.Should().ContainKey(ParameterNames.ApimServiceName); templateParameters.Should().ContainKey(ParameterNames.PolicyXMLBaseUrl); templateParameters.Should().ContainKey(ParameterNames.PolicyXMLSasToken); - templateParameters.Should().ContainKey(ParameterNames.ServiceUrl); - templateParameters.Should().ContainKey(ParameterNames.ApiLoggerId); var templateResources = productTemplate.Resources;