From 4d3e4ad8bb420464892a3c873eadee77ddbb1206 Mon Sep 17 00:00:00 2001 From: Behnaz Hassanshahi Date: Tue, 1 Oct 2024 08:48:05 +1000 Subject: [PATCH] test: remove unnecessary integration tests for micronaut-test-junit5 (#880) Signed-off-by: behnazh-w --- .../caffeine.dl | 22 ------------- .../micronaut-test.dl | 3 +- .../slf4j.dl | 22 ------------- .../test.yaml | 32 ++----------------- 4 files changed, 5 insertions(+), 74 deletions(-) delete mode 100644 tests/integration/cases/micronaut-projects_micronaut-test/caffeine.dl delete mode 100644 tests/integration/cases/micronaut-projects_micronaut-test/slf4j.dl diff --git a/tests/integration/cases/micronaut-projects_micronaut-test/caffeine.dl b/tests/integration/cases/micronaut-projects_micronaut-test/caffeine.dl deleted file mode 100644 index f1ed51a30..000000000 --- a/tests/integration/cases/micronaut-projects_micronaut-test/caffeine.dl +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */ -/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */ - -#include "prelude.dl" - -Policy("test_policy", component_id, "") :- - check_passed(component_id, "mcn_build_as_code_1"), - check_passed(component_id, "mcn_build_script_1"), - check_passed(component_id, "mcn_build_service_1"), - check_passed(component_id, "mcn_version_control_system_1"), - check_failed(component_id, "mcn_infer_artifact_pipeline_1"), - check_failed(component_id, "mcn_provenance_available_1"), - check_failed(component_id, "mcn_provenance_derived_commit_1"), - check_failed(component_id, "mcn_provenance_derived_repo_1"), - check_failed(component_id, "mcn_provenance_expectation_1"), - check_failed(component_id, "mcn_provenance_level_three_1"), - check_failed(component_id, "mcn_provenance_witness_level_one_1"), - check_failed(component_id, "mcn_trusted_builder_level_three_1"), - is_repo_url(component_id, "https://github.com/ben-manes/caffeine"). - -apply_policy_to("test_policy", component_id) :- - is_component(component_id, "pkg:github.com/ben-manes/caffeine@05a040c2478341bab8a58a02b3dc1fe14d626d72"). diff --git a/tests/integration/cases/micronaut-projects_micronaut-test/micronaut-test.dl b/tests/integration/cases/micronaut-projects_micronaut-test/micronaut-test.dl index f20692bcc..a567df4d0 100644 --- a/tests/integration/cases/micronaut-projects_micronaut-test/micronaut-test.dl +++ b/tests/integration/cases/micronaut-projects_micronaut-test/micronaut-test.dl @@ -18,4 +18,5 @@ Policy("test_policy", component_id, "") :- is_repo_url(component_id, "https://github.com/micronaut-projects/micronaut-test"). apply_policy_to("test_policy", component_id) :- - is_component(component_id, "pkg:github.com/micronaut-projects/micronaut-test@5b81340f319a2287cb2e81ddec0154c0ea2510cf"). + is_component(component_id, purl), + match("pkg:maven/io.micronaut.test/micronaut-test-junit5@.*", purl). diff --git a/tests/integration/cases/micronaut-projects_micronaut-test/slf4j.dl b/tests/integration/cases/micronaut-projects_micronaut-test/slf4j.dl deleted file mode 100644 index e39451bae..000000000 --- a/tests/integration/cases/micronaut-projects_micronaut-test/slf4j.dl +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2024 - 2024, Oracle and/or its affiliates. All rights reserved. */ -/* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. */ - -#include "prelude.dl" - -Policy("test_policy", component_id, "") :- - check_passed(component_id, "mcn_build_script_1"), - check_passed(component_id, "mcn_build_service_1"), - check_passed(component_id, "mcn_version_control_system_1"), - check_failed(component_id, "mcn_build_as_code_1"), - check_failed(component_id, "mcn_infer_artifact_pipeline_1"), - check_failed(component_id, "mcn_provenance_available_1"), - check_failed(component_id, "mcn_provenance_derived_commit_1"), - check_failed(component_id, "mcn_provenance_derived_repo_1"), - check_failed(component_id, "mcn_provenance_expectation_1"), - check_failed(component_id, "mcn_provenance_level_three_1"), - check_failed(component_id, "mcn_provenance_witness_level_one_1"), - check_failed(component_id, "mcn_trusted_builder_level_three_1"), - is_repo_url(component_id, "https://github.com/qos-ch/slf4j"). - -apply_policy_to("test_policy", component_id) :- - is_component(component_id, "pkg:github.com/qos-ch/slf4j@e9ee55cca93c2bf26f14482a9bdf961c750d2a56"). diff --git a/tests/integration/cases/micronaut-projects_micronaut-test/test.yaml b/tests/integration/cases/micronaut-projects_micronaut-test/test.yaml index fa88c302e..e0344b508 100644 --- a/tests/integration/cases/micronaut-projects_micronaut-test/test.yaml +++ b/tests/integration/cases/micronaut-projects_micronaut-test/test.yaml @@ -13,41 +13,15 @@ steps: kind: analyze options: command_args: - - -rp - - https://github.com/micronaut-projects/micronaut-test - - -d - - 5b81340f319a2287cb2e81ddec0154c0ea2510cf + - -purl + - pkg:maven/io.micronaut.test/micronaut-test-junit5@4.5.0 - name: Validate JSON report schema kind: validate_schema options: kind: json_schema schema: output_json_report - result: output/reports/github_com/micronaut-projects/micronaut-test/micronaut-test.json -- name: Run macaron analyze qos-ch/slf4j - kind: analyze - options: - command_args: - - -rp - - https://github.com/qos-ch/slf4j - - -d - - e9ee55cca93c2bf26f14482a9bdf961c750d2a56 -- name: Run macaron analyze ben-manes/caffeine - kind: analyze - options: - command_args: - - -rp - - https://github.com/ben-manes/caffeine - - -d - - 05a040c2478341bab8a58a02b3dc1fe14d626d72 + result: output/reports/maven/io_micronaut_test/micronaut-test-junit5/micronaut-test-junit5.json - name: Run macaron verify-policy for micronaut-test kind: verify options: policy: micronaut-test.dl -- name: Run macaron verify-policy for caffeine - kind: verify - options: - policy: caffeine.dl -- name: Run macaron verify-policy for slf4j - kind: verify - options: - policy: slf4j.dl