@@ -1901,15 +1901,18 @@ def test_get_spark_conf_with_jira_validation_disabled(self, mock_spark_srv_conf_
19011901 assert 'spark.kubernetes.executor.label.spark.yelp.com/jira_ticket' not in result
19021902
19031903 @pytest .mark .parametrize (
1904- 'user,should_check' , [
1905- ('regular_user' , True ),
1906- ('batch' , False ),
1907- ('TRON' , False ),
1908- (None , False ),
1904+ 'cluster_manager,user,should_check' , [
1905+ ('kubernetes' , 'regular_user' , True ),
1906+ ('kubernetes' , 'batch' , False ),
1907+ ('kubernetes' , 'TRON' , False ),
1908+ ('kubernetes' , None , False ),
1909+ ('local' , 'regular_user' , False ),
1910+ ('local' , 'TRON' , False ),
1911+ ('local' , None , False ),
19091912 ],
19101913 )
19111914 def test_jira_ticket_check_for_different_users (
1912- self , user , should_check , mock_spark_srv_conf_file_with_jira_enabled , mock_log ,
1915+ self , cluster_manager , user , should_check , mock_spark_srv_conf_file_with_jira_enabled , mock_log ,
19131916 ):
19141917 """Test that Jira ticket validation is skipped for certain users."""
19151918 spark_conf_builder = spark_config .SparkConfBuilder ()
@@ -1918,7 +1921,7 @@ def test_jira_ticket_check_for_different_users(
19181921 # For regular users, validation should be enforced
19191922 with pytest .raises (RuntimeError ):
19201923 spark_conf_builder .get_spark_conf (
1921- cluster_manager = 'kubernetes' ,
1924+ cluster_manager = cluster_manager ,
19221925 spark_app_base_name = 'test-app' ,
19231926 user_spark_opts = {},
19241927 paasta_cluster = 'test-cluster' ,
@@ -1931,7 +1934,7 @@ def test_jira_ticket_check_for_different_users(
19311934 else :
19321935 # For special users, validation should be skipped
19331936 spark_conf_builder .get_spark_conf (
1934- cluster_manager = 'kubernetes' ,
1937+ cluster_manager = cluster_manager ,
19351938 spark_app_base_name = 'test-app' ,
19361939 user_spark_opts = {},
19371940 paasta_cluster = 'test-cluster' ,
0 commit comments