File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,12 +89,6 @@ def cel_go_test(
8989
9090 test_data_path = test_data_path .lstrip ("/" )
9191
92- if cel_expr_format != ".cel" and cel_expr_format != ".celpolicy" and cel_expr_format != ".yaml" and not is_raw_expr :
93- data = data + [cel_expr ]
94-
95- if file_descriptor_set != "" :
96- data = data + [file_descriptor_set ]
97-
9892 if test_suite != "" :
9993 test_suite = test_data_path + "/" + test_suite
10094
@@ -112,16 +106,16 @@ def cel_go_test(
112106 "--base_config_path=%s" % base_config ,
113107 ]
114108
115- _ , cel_expr_format = paths .split_extension (cel_expr )
116-
117109 if cel_expr_format == ".cel" or cel_expr_format == ".celpolicy" or cel_expr_format == ".yaml" :
118110 args .append ("--cel_expr=%s" % test_data_path + "/" + cel_expr )
119111 elif is_raw_expr :
112+ data = data + [cel_expr ]
120113 args .append ("--cel_expr=%s" % cel_expr )
121114 else :
122115 args .append ("--cel_expr=$(location {})" .format (cel_expr ))
123116
124117 if file_descriptor_set != "" :
118+ data = data + [file_descriptor_set ]
125119 args .append ("--file_descriptor_set=$(location {})" .format (file_descriptor_set ))
126120
127121 go_test (
You can’t perform that action at this time.
0 commit comments