diff --git a/testing/src/test/java/dev/cel/testing/testrunner/BUILD.bazel b/testing/src/test/java/dev/cel/testing/testrunner/BUILD.bazel index db1202aa8..6398cfe17 100644 --- a/testing/src/test/java/dev/cel/testing/testrunner/BUILD.bazel +++ b/testing/src/test/java/dev/cel/testing/testrunner/BUILD.bazel @@ -76,282 +76,300 @@ java_library( ], ) -java_test( - name = "junit_xml_reporter_test", - srcs = ["JUnitXmlReporterTest.java"], - test_class = "dev.cel.testing.testrunner.JUnitXmlReporterTest", - deps = [ - "//:java_truth", - "//testing/testrunner:junit_xml_reporter", - "@maven//:junit_junit", - "@maven//:org_mockito_mockito_core", - ], -) +# java_test( +# name = "junit_xml_reporter_test", +# srcs = ["JUnitXmlReporterTest.java"], +# test_class = "dev.cel.testing.testrunner.JUnitXmlReporterTest", +# deps = [ +# "//testing/testrunner:junit_xml_reporter", +# "//third_party/java/junit", +# "//third_party/java/mockito", +# "//third_party/java/truth", +# ], +# ) -java_test( - name = "default_result_matcher_test", - srcs = ["DefaultResultMatcherTest.java"], - test_class = "dev.cel.testing.testrunner.DefaultResultMatcherTest", - deps = [ - "//:java_truth", - "//bundle:cel", - "//common/types", - "//runtime", - "//testing/testrunner:cel_test_suite", - "//testing/testrunner:default_result_matcher", - "//testing/testrunner:result_matcher", - "@cel_spec//proto/cel/expr:expr_java_proto", - "@maven//:com_google_guava_guava", - "@maven//:com_google_testparameterinjector_test_parameter_injector", - "@maven//:junit_junit", - ], -) +# java_test( +# name = "default_result_matcher_test", +# srcs = ["DefaultResultMatcherTest.java"], +# test_class = "dev.cel.testing.testrunner.DefaultResultMatcherTest", +# deps = [ +# "//google/api/expr:expr_java_proto", +# "//java/com/google/common/collect", +# "//bundle:cel", +# "//common/types", +# "//runtime", +# "//testing/testrunner:cel_test_suite", +# "//testing/testrunner:default_result_matcher", +# "//testing/testrunner:result_matcher", +# "//third_party/java/junit", +# "//third_party/java/testparameterinjector", +# "//third_party/java/truth", +# ], +# ) -java_test( - name = "cel_test_suite_yaml_parser_test", - srcs = ["CelTestSuiteYamlParserTest.java"], - test_class = "dev.cel.testing.testrunner.CelTestSuiteYamlParserTest", - deps = [ - "//:java_truth", - "//testing/testrunner:cel_test_suite", - "//testing/testrunner:cel_test_suite_exception", - "//testing/testrunner:cel_test_suite_yaml_parser", - "@maven//:com_google_guava_guava", - "@maven//:com_google_testparameterinjector_test_parameter_injector", - "@maven//:junit_junit", - ], -) +# java_test( +# name = "cel_test_suite_yaml_parser_test", +# srcs = ["CelTestSuiteYamlParserTest.java"], +# test_class = "dev.cel.testing.testrunner.CelTestSuiteYamlParserTest", +# deps = [ +# "//java/com/google/common/collect", +# "//testing/testrunner:cel_test_suite", +# "//testing/testrunner:cel_test_suite_exception", +# "//testing/testrunner:cel_test_suite_yaml_parser", +# "//third_party/java/junit", +# "//third_party/java/testparameterinjector", +# "//third_party/java/truth", +# ], +# ) -java_test( - name = "cel_test_suite_textproto_parser_test", - srcs = ["CelTestSuiteTextprotoParserTest.java"], - test_class = "dev.cel.testing.testrunner.CelTestSuiteTextprotoParserTest", - deps = [ - "//:java_truth", - "//testing/testrunner:cel_test_suite_exception", - "//testing/testrunner:cel_test_suite_text_proto_parser", - "@cel_spec//proto/cel/expr/conformance/test:suite_java_proto", - "@maven//:junit_junit", - ], -) +# java_test( +# name = "cel_test_suite_textproto_parser_test", +# srcs = ["CelTestSuiteTextprotoParserTest.java"], +# test_class = "dev.cel.testing.testrunner.CelTestSuiteTextprotoParserTest", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/test:suite_java_proto", +# "//testing/testrunner:cel_test_suite_exception", +# "//testing/testrunner:cel_test_suite_text_proto_parser", +# "//third_party/java/junit", +# "//third_party/java/truth", +# ], +# ) cel_java_test( - name = "test_runner_sample_yaml", - cel_expr = "nested_rule/policy.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], + name = "late_function_binding_test_runner_sample", + cel_expr = "late_function_binding/policy.yaml", + config = "late_function_binding/config.yaml", test_data_path = "//testing/src/test/resources/policy", - test_src = ":user_test", - test_suite = "nested_rule/testrunner_tests.yaml", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], + test_src = ":late_function_binding_user_test", + test_suite = "late_function_binding/tests.yaml", ) -cel_java_test( - name = "unknown_set_yaml", - cel_expr = "nested_rule/policy.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":user_test", - test_suite = "nested_rule/testrunner_unknown_output_tests.yaml", -) +# cel_java_test( +# name = "test_runner_sample_yaml", +# cel_expr = "nested_rule/policy.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":user_test", +# test_suite = "nested_rule/testrunner_tests.yaml", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "custom_variable_binding_test_runner_sample", - cel_expr = "custom_variable_bindings/policy.yaml", - config = "custom_variable_bindings/config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":custom_variable_binding_user_test", - test_suite = "custom_variable_bindings/tests.yaml", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# cel_java_test( +# name = "unknown_set_yaml", +# cel_expr = "nested_rule/policy.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":user_test", +# test_suite = "nested_rule/testrunner_unknown_output_tests.yaml", +# ) -cel_java_test( - name = "test_runner_yaml_sample_with_eval_error", - cel_expr = "nested_rule/eval_error_policy.yaml", - config = "nested_rule/eval_error_config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":env_config_user_test", - test_suite = "nested_rule/eval_error_tests.yaml", -) +# cel_java_test( +# name = "custom_variable_binding_test_runner_sample", +# cel_expr = "custom_variable_bindings/policy.yaml", +# config = "custom_variable_bindings/config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":custom_variable_binding_user_test", +# test_suite = "custom_variable_bindings/tests.yaml", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "context_pb_user_test_runner_sample", - cel_expr = "context_pb/policy.yaml", - config = "context_pb/config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":context_pb_user_test", - test_suite = "context_pb/tests.yaml", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# cel_java_test( +# name = "test_runner_yaml_sample_with_eval_error", +# cel_expr = "nested_rule/eval_error_policy.yaml", +# config = "nested_rule/eval_error_config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":env_config_user_test", +# test_suite = "nested_rule/eval_error_tests.yaml", +# ) -cel_java_test( - name = "additional_config_test_runner_sample", - cel_expr = "nested_rule/policy.yaml", - config = "nested_rule/config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":env_config_user_test", - test_suite = "nested_rule/testrunner_tests.textproto", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# cel_java_test( +# name = "context_pb_user_test_runner_sample", +# cel_expr = "context_pb/policy.yaml", +# config = "context_pb/config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":context_pb_user_test", +# test_suite = "context_pb/tests.yaml", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "test_runner_sample", - cel_expr = "nested_rule/policy.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":user_test", - test_suite = "nested_rule/testrunner_tests.textproto", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# cel_java_test( +# name = "additional_config_test_runner_sample", +# cel_expr = "nested_rule/policy.yaml", +# config = "nested_rule/config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":env_config_user_test", +# test_suite = "nested_rule/testrunner_tests.textproto", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "test_runner_sample_with_expr_value_output", - cel_expr = "expr_value_output/policy.yaml", - test_data_path = "//testing/src/test/resources/policy", - test_src = ":user_test", - test_suite = "expr_value_output/tests.textproto", -) +# cel_java_test( +# name = "test_runner_sample", +# cel_expr = "nested_rule/policy.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":user_test", +# test_suite = "nested_rule/testrunner_tests.textproto", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "test_runner_sample_with_eval_error", - cel_expr = "nested_rule/eval_error_policy.yaml", - config = "nested_rule/eval_error_config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":env_config_user_test", - test_suite = "nested_rule/eval_error_tests.textproto", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# cel_java_test( +# name = "test_runner_sample_with_expr_value_output", +# cel_expr = "expr_value_output/policy.yaml", +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":user_test", +# test_suite = "expr_value_output/tests.textproto", +# ) -cel_java_test( - name = "context_message_user_test_runner_textproto_sample", - cel_expr = "context_pb/policy.yaml", - config = "context_pb/config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":context_pb_user_test", - test_suite = "context_pb/context_msg_tests.textproto", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# java_library( +# name = "custom_test_suite", +# srcs = ["CustomTestSuite.java"], +# deps = [ +# "//java/com/google/common/collect", +# "//testing/testrunner:annotations", +# "//testing/testrunner:cel_test_suite", +# ], +# ) + +# cel_java_test( +# name = "test_runner_sample_with_eval_error", +# cel_expr = "nested_rule/eval_error_policy.yaml", +# config = "nested_rule/eval_error_config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":env_config_user_test", +# test_suite = "nested_rule/eval_error_tests.textproto", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) cel_java_test( - name = "context_pb_user_test_runner_textproto_sample", - cel_expr = "context_pb/policy.yaml", - config = "context_pb/config.yaml", - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], + name = "late_function_binding_test_runner_textproto_sample", + cel_expr = "late_function_binding/policy.yaml", + config = "late_function_binding/config.yaml", test_data_path = "//testing/src/test/resources/policy", - test_src = ":context_pb_user_test", - test_suite = "context_pb/tests.textproto", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], + test_src = ":late_function_binding_user_test", + test_suite = "late_function_binding/tests.textproto", ) -cel_java_test( - name = "raw_expression_test", - cel_expr = "2 + 2 == 4", - is_raw_expr = True, - test_data_path = "//testing/src/test/resources/expressions", - test_src = ":user_test", - test_suite = "simple_test_case/tests.textproto", -) +# cel_java_test( +# name = "context_message_user_test_runner_textproto_sample", +# cel_expr = "context_pb/policy.yaml", +# config = "context_pb/config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":context_pb_user_test", +# test_suite = "context_pb/context_msg_tests.textproto", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "extension_as_input_test", - cel_expr = "2 + 2 == 4", - is_raw_expr = True, - proto_deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", - ], - test_data_path = "//testing/src/test/resources/policy", - test_src = ":user_test", - test_suite = "protoextension_value_as_input/tests.textproto", - deps = [ - "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", - "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", - ], -) +# cel_java_test( +# name = "context_pb_user_test_runner_textproto_sample", +# cel_expr = "context_pb/policy.yaml", +# config = "context_pb/config.yaml", +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":context_pb_user_test", +# test_suite = "context_pb/tests.textproto", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -java_library( - name = "custom_test_suite", - srcs = ["CustomTestSuite.java"], - deps = [ - "//testing/testrunner:annotations", - "//testing/testrunner:cel_test_suite", - "@maven//:com_google_guava_guava", - ], -) +# cel_java_test( +# name = "raw_expression_test", +# cel_expr = "2 + 2 == 4", +# is_raw_expr = True, +# test_data_path = "//testing/src/test/resources/expressions", +# test_src = ":user_test", +# test_suite = "simple_test_case/tests.textproto", +# ) -cel_java_test( - name = "custom_test_suite_test", - cel_expr = "2 + 2 == 4", - is_raw_expr = True, - test_src = ":user_test", - deps = [ - ":custom_test_suite", - ], -) +# cel_java_test( +# name = "extension_as_input_test", +# cel_expr = "2 + 2 == 4", +# is_raw_expr = True, +# proto_deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto", +# ], +# test_data_path = "//testing/src/test/resources/policy", +# test_src = ":user_test", +# test_suite = "protoextension_value_as_input/tests.textproto", +# deps = [ +# "@cel_spec//proto/cel/expr/conformance/proto2:test_all_types_java_proto", +# "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto", +# ], +# ) -cel_java_test( - name = "expression_cel_file_test", - cel_expr = "simple_test_case/simple_expression.cel", - test_data_path = "//testing/src/test/resources/expressions", - test_src = ":user_test", - test_suite = "simple_test_case/tests.textproto", -) +# cel_java_test( +# name = "custom_test_suite_test", +# cel_expr = "2 + 2 == 4", +# is_raw_expr = True, +# test_src = ":user_test", +# deps = [ +# ":custom_test_suite", +# ], +# ) + +# cel_java_test( +# name = "expression_cel_file_test", +# cel_expr = "simple_test_case/simple_expression.cel", +# test_data_path = "//testing/src/test/resources/expressions", +# test_src = ":user_test", +# test_suite = "simple_test_case/tests.textproto", +# )