File tree Expand file tree Collapse file tree 3 files changed +80
-2
lines changed
micronaut-projects_micronaut-core Expand file tree Collapse file tree 3 files changed +80
-2
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ def gen_build_spec(gen_build_spec_args: argparse.Namespace) -> int:
263
263
try :
264
264
purl = PackageURL .from_string (gen_build_spec_args .package_url )
265
265
except ValueError as error :
266
- logger .error ("Cannot parse purl %s. Error %s. " , gen_build_spec_args .package_url , error )
266
+ logger .error ("Cannot parse purl %s. Error %s" , gen_build_spec_args .package_url , error )
267
267
return os .EX_USAGE
268
268
269
269
build_spec_content = gen_build_spec_str (
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 - 2025, Oracle and/or its affiliates. All rights reserved.
2
+ # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
3
+
4
+ description : |
5
+ Running macaron gen-build-spec with invalid arguments.
6
+
7
+ tags :
8
+ - macaron-python-package
9
+ - macaron-docker-image
10
+ - macaron-gen-build-spec
11
+
12
+ steps :
13
+ - name : Run macaron analyze on the remote repository.
14
+ kind : analyze
15
+ options :
16
+ command_args :
17
+ - --package-url
18
+ - pkg:maven/io.github.behnazh-w.demo/example-maven-app@2.0?type=jar
19
+ - -rp
20
+ - https://github.com/behnazh-w/example-maven-app
21
+ - name : Using a format that we don't support.
22
+ kind : gen-build-spec
23
+ options :
24
+ command_args :
25
+ - -purl
26
+ - pkg:maven/io.github.behnazh-w.demo/example-maven-app@2.0?type=jar
27
+ - --output-format
28
+ - this-format-is-not-supported
29
+ expect_fail : true
30
+ - name : Generate the RC Buildspec for a PURL that we haven't analyzed.
31
+ kind : gen-build-spec
32
+ options :
33
+ command_args :
34
+ - -purl
35
+ - pkg:maven/io.micronaut/micronaut-core@4.2.3
36
+ - --output-format
37
+ - rc-buildspec
38
+ expect_fail : true
39
+ - name : Generate the RC Buildspec for a PURL that doesn't have namespace information.
40
+ kind : gen-build-spec
41
+ options :
42
+ command_args :
43
+ - -purl
44
+ - pkg:maven/io.micronaut@4.2.3
45
+ - --output-format
46
+ - rc-buildspec
47
+ expect_fail : true
48
+ - name : Generate the RC Buildspec for a PURL that doesn't have version information.
49
+ kind : gen-build-spec
50
+ options :
51
+ command_args :
52
+ - -purl
53
+ - pkg:maven/io.micronaut/micronaut-core
54
+ - --output-format
55
+ - rc-buildspec
56
+ expect_fail : true
57
+ - name : Generate the RC Buildspec using a database that doesn't exist.
58
+ kind : gen-build-spec
59
+ options :
60
+ database : output/some_database.db
61
+ command_args :
62
+ - -purl
63
+ - pkg:maven/io.github.behnazh-w.demo/example-maven-app@2.0?type=jar
64
+ - --output-format
65
+ - rc-buildspec
66
+ expect_fail : true
67
+ - name : Generate the RC Buildspec using an invalid PURL.
68
+ kind : gen-build-spec
69
+ options :
70
+ command_args :
71
+ - -purl
72
+ - invalid_purl
73
+ - --output-format
74
+ - rc-buildspec
75
+ expect_fail : true
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ description: |
8
8
9
9
tags :
10
10
- macaron-python-package
11
+ - macaron-gen-build-spec
11
12
12
13
steps :
13
14
- name : Run macaron analyze
@@ -31,12 +32,14 @@ steps:
31
32
kind : policy_report
32
33
result : output/policy_report.json
33
34
expected : policy_report.json
34
- - name : Run build spec generation
35
+ - name : Run Reproducible-central build spec generation
35
36
kind : gen-build-spec
36
37
options :
37
38
command_args :
38
39
- -purl
39
40
- pkg:maven/io.micronaut/micronaut-core@4.2.3
41
+ - --output-format
42
+ - rc-buildspec
40
43
- name : Compare Buildspec.
41
44
kind : compare
42
45
options :
You can’t perform that action at this time.
0 commit comments