Skip to content

Commit 9ef8b3e

Browse files
committed
chore: simplify integration test
Signed-off-by: Ben Selwyn-Smith <benselwynsmith@googlemail.com>
1 parent 26ba400 commit 9ef8b3e

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

tests/integration/cases/github_maven_artifact_local/failure_policy.dl renamed to tests/integration/cases/github_maven_artifact_local/policy.dl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
#include "prelude.dl"
55

66
Policy("test_policy", component_id, "") :-
7-
check_failed(component_id, "mcn_provenance_available_1").
7+
check_passed(component_id, "mcn_provenance_available_1"),
8+
release_artifact(_, "./output/liftwizard-checkstyle-2.1.22.jar", _, _).
89

910
apply_policy_to("test_policy", component_id) :-
1011
is_component(component_id, "pkg:maven/io.liftwizard/liftwizard-checkstyle@2.1.22").

tests/integration/cases/github_maven_artifact_local/success_policy.dl

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/integration/cases/github_maven_artifact_local/test.yaml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,12 @@
33

44
description: |
55
Discovering GitHub attestation of a command line provided Maven artifact.
6-
An incorrect file is downloaded first, to demonstrate that the feature is taking precedence over other options.
7-
The correct file is then used to ensure the feature works.
86
97
tags:
108
- macaron-python-package
119
- macaron-docker-image
1210

1311
steps:
14-
- name: Download artifact POM instead of the JAR
15-
kind: shell
16-
options:
17-
cmd: curl --create-dirs -o ./output/liftwizard-checkstyle-2.1.22.jar https://repo1.maven.org/maven2/io/liftwizard/liftwizard-checkstyle/2.1.22/liftwizard-checkstyle-2.1.22.pom
18-
- name: Run macaron analyze
19-
kind: analyze
20-
options:
21-
command_args:
22-
- -purl
23-
- pkg:maven/io.liftwizard/liftwizard-checkstyle@2.1.22
24-
- -rp
25-
- https://github.com/liftwizard/liftwizard
26-
- --local-artifact-path
27-
- ./output/liftwizard-checkstyle-2.1.22.jar
28-
- name: Run macaron verify-policy to verify no provenance was found
29-
kind: verify
30-
options:
31-
policy: failure_policy.dl
32-
- name: cleanup
33-
kind: shell
34-
options:
35-
cmd: rm -rf ./output
3612
- name: Download artifact JAR
3713
kind: shell
3814
options:
@@ -47,7 +23,7 @@ steps:
4723
- https://github.com/liftwizard/liftwizard
4824
- --local-artifact-path
4925
- ./output/liftwizard-checkstyle-2.1.22.jar
50-
- name: Run macaron verify-policy to verify no provenance was found
26+
- name: Run macaron verify-policy to verify provenance was found
5127
kind: verify
5228
options:
53-
policy: success_policy.dl
29+
policy: policy.dl

0 commit comments

Comments
 (0)