@@ -219,14 +219,29 @@ func getFirewall(ctx context.Context, location, firewallSubnetID, publicIPID str
219219 TargetFqdns : []* string {to .Ptr (blobStorageFqdn )},
220220 }
221221
222+ // needed for Mock Azure China Cloud tests
223+ mooncakeMAR := "mcr.azure.cn"
224+ mooncakeMARData := "*.data.mcr.azure.cn"
225+ mooncakeMARRule := armnetwork.AzureFirewallApplicationRule {
226+ Name : to .Ptr ("mooncake-mar-fqdn" ),
227+ SourceAddresses : []* string {to .Ptr ("*" )},
228+ Protocols : []* armnetwork.AzureFirewallApplicationRuleProtocol {
229+ {
230+ ProtocolType : to .Ptr (armnetwork .AzureFirewallApplicationRuleProtocolTypeHTTPS ),
231+ Port : to.Ptr [int32 ](443 ),
232+ },
233+ },
234+ TargetFqdns : []* string {to .Ptr (mooncakeMAR ), to .Ptr (mooncakeMARData )},
235+ }
236+
222237 appRuleCollection := armnetwork.AzureFirewallApplicationRuleCollection {
223238 Name : to .Ptr ("aksfwar" ),
224239 Properties : & armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat {
225240 Priority : to.Ptr [int32 ](100 ),
226241 Action : & armnetwork.AzureFirewallRCAction {
227242 Type : to .Ptr (armnetwork .AzureFirewallRCActionTypeAllow ),
228243 },
229- Rules : []* armnetwork.AzureFirewallApplicationRule {& aksAppRule , & blobStorageAppRule },
244+ Rules : []* armnetwork.AzureFirewallApplicationRule {& aksAppRule , & blobStorageAppRule , & mooncakeMARRule },
230245 },
231246 }
232247
0 commit comments