From 4b2adc3429cfb475911970e7d14889a85a5952df Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Thu, 25 Sep 2025 07:47:40 +0000 Subject: [PATCH] fix: Add @live_only() annotations to bicep scenario tests for CI compatibility - Add @live_only() annotation to test_bicep_deployment_size_optimization - Add @live_only() annotation to test_bicep_vs_arm_template_deployment - These tests require bicep CLI which is not available in CI environments - Annotations ensure tests only run in live test scenarios, preventing CI failures - Unit tests with mocks continue to run in CI for proper coverage Tests validated: - 2 scenario tests properly SKIPPED in CI mode - 8 unit tests continue to PASS in CI mode --- .../resource/tests/latest/test_resource_custom.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_custom.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_custom.py index 35ae70992d5..29b893ce80b 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_custom.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_custom.py @@ -884,6 +884,7 @@ class BicepTemplateSizeOptimizationScenarioTest(ScenarioTest): correctly in real deployment scenarios and generates recordings for CI/CD. """ + @live_only() @ResourceGroupPreparer(name_prefix='cli_test_bicep_size_opt') def test_bicep_deployment_size_optimization(self, resource_group): """Test that bicep deployments work correctly with size optimization. @@ -955,6 +956,7 @@ def test_bicep_deployment_size_optimization(self, resource_group): if os.path.exists(bicep_file_path): os.unlink(bicep_file_path) + @live_only() @ResourceGroupPreparer(name_prefix='cli_test_bicep_vs_arm_opt') def test_bicep_vs_arm_template_deployment(self, resource_group): """Test both bicep and ARM template deployments work correctly.