From cfeec66b060cb7ed834dfd511307d755dc0d2df8 Mon Sep 17 00:00:00 2001 From: Lili Deng Date: Mon, 19 Aug 2024 09:57:01 +0800 Subject: [PATCH] extension cases: change cases which have the requirement for blob public access priority into 5 --- .../runtime_extensions/custom_script.py | 40 +++++++++++++++---- .../runtime_extensions/run_commandv1.py | 35 ++++++++++++---- .../runtime_extensions/run_commandv2.py | 5 ++- 3 files changed, 64 insertions(+), 16 deletions(-) diff --git a/microsoft/testsuites/vm_extensions/runtime_extensions/custom_script.py b/microsoft/testsuites/vm_extensions/runtime_extensions/custom_script.py index 5aa3affe11..9cb52117e6 100644 --- a/microsoft/testsuites/vm_extensions/runtime_extensions/custom_script.py +++ b/microsoft/testsuites/vm_extensions/runtime_extensions/custom_script.py @@ -102,8 +102,11 @@ def before_case(self, log: Logger, **kwargs: Any) -> None: @TestCaseMetadata( description=""" Runs the Custom Script VM extension with a public Azure storage file uri. + + Downgrading priority from 1 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=1, + priority=5, ) def verify_public_script_run( self, log: Logger, node: Node, environment: Environment @@ -130,8 +133,11 @@ def verify_public_script_run( description=""" Runs the Custom Script VM extension with 2 public file uris passed in and second script being run. Verifies second script created. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_second_public_script_run( self, log: Logger, node: Node, environment: Environment @@ -173,8 +179,11 @@ def verify_second_public_script_run( description=""" Runs the Custom Script VM extension with public file uri and command in both public and protected settings. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_script_in_both_settings_failed( self, log: Logger, node: Node, environment: Environment @@ -208,8 +217,11 @@ def verify_script_in_both_settings_failed( description=""" Runs the Custom Script VM extension with public file uri and command in protected settings. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_protected_settings_run( self, log: Logger, node: Node, environment: Environment @@ -241,8 +253,11 @@ def verify_public_script_protected_settings_run( @TestCaseMetadata( description=""" Runs the Custom Script VM extension without a command and a script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_without_command_run( self, log: Logger, node: Node, environment: Environment @@ -292,8 +307,11 @@ def verify_base64_script_with_command_run(self, log: Logger, node: Node) -> None @TestCaseMetadata( description=""" Runs the Custom Script VM extension with a base64 script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_with_base64_script_run( self, log: Logger, node: Node, environment: Environment @@ -322,8 +340,11 @@ def verify_public_script_with_base64_script_run( @TestCaseMetadata( description=""" Runs the Custom Script VM extension with a gzip'ed base64 script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_with_gzip_base64_script_run( self, log: Logger, node: Node, environment: Environment @@ -464,8 +485,11 @@ def verify_private_sas_script_run( description=""" Runs the Custom Script VM extension with a public Azure storage file uri pointing to a python script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_python_script_run( self, log: Logger, node: Node, environment: Environment diff --git a/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv1.py b/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv1.py index 3fd8b0fe58..29c898f825 100644 --- a/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv1.py +++ b/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv1.py @@ -97,8 +97,11 @@ class RunCommandV1Tests(TestSuite): @TestCaseMetadata( description=""" Runs the Run Command v2 VM extension with a public Azure storage file uri. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_run( self, log: Logger, node: Node, environment: Environment @@ -125,8 +128,11 @@ def verify_public_script_run( description=""" Runs the Run Command v1 VM extension with 2 public file uris passed in and second script being run. Verifies second script created. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_second_public_script_run( self, log: Logger, node: Node, environment: Environment @@ -168,8 +174,11 @@ def verify_second_public_script_run( description=""" Runs the Run Command v1 VM extension with public file uri and command in both public and protected settings. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_script_in_both_settings_failed( self, log: Logger, node: Node, environment: Environment @@ -203,8 +212,11 @@ def verify_script_in_both_settings_failed( description=""" Runs the Run Command v1 VM extension with public file uri and command in protected settings. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_protected_settings_run( self, log: Logger, node: Node, environment: Environment @@ -236,8 +248,11 @@ def verify_public_script_protected_settings_run( @TestCaseMetadata( description=""" Runs the Run Command v1 VM extension without a command and a script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_without_command_run_failed( self, log: Logger, node: Node, environment: Environment @@ -289,8 +304,11 @@ def verify_base64_script_with_command_run_failed( @TestCaseMetadata( description=""" Runs the Custom Script VM extension with a base64 script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_script_with_base64_script_run( self, log: Logger, node: Node, environment: Environment @@ -460,8 +478,11 @@ def verify_private_sas_script_run( description=""" Runs the Run Command v1 VM extension with a public Azure storage file uri pointing to a python script. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_python_script_run( self, log: Logger, node: Node, environment: Environment diff --git a/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv2.py b/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv2.py index b2c8eed02e..326547f46f 100644 --- a/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv2.py +++ b/microsoft/testsuites/vm_extensions/runtime_extensions/run_commandv2.py @@ -207,8 +207,11 @@ def verify_script_run_with_protected_parameter( description=""" Runs the Run Command v2 VM extension with a public uri pointing to the script in blob storage. + + Downgrading priority from 3 to 5. Due to the requirement for blob public access, + which is restricted for security reasons. """, - priority=3, + priority=5, ) def verify_public_uri_script_run( self, log: Logger, node: Node, environment: Environment