@@ -81,6 +81,41 @@ def test_sign_success_default_output_bundle(capsys, sigstore, asset_integration)
81
81
)
82
82
83
83
84
+ @pytest .mark .staging
85
+ @pytest .mark .ambient_oidc
86
+ def test_sign_success_multiple_artifacts (capsys , sigstore , asset_integration ):
87
+ artifacts = [
88
+ asset_integration ("a.txt" ),
89
+ asset_integration ("b.txt" ),
90
+ asset_integration ("c.txt" ),
91
+ ]
92
+
93
+ sigstore (
94
+ * get_cli_params (
95
+ artifact_paths = artifacts ,
96
+ )
97
+ )
98
+
99
+ captures = capsys .readouterr ()
100
+
101
+ for artifact in artifacts :
102
+ expected_output_bundle = Path (f"{ artifact } .sigstore.json" )
103
+
104
+ assert f"Sigstore bundle written to { expected_output_bundle } \n " in captures .out
105
+
106
+ assert expected_output_bundle .exists ()
107
+ verifier = Verifier .staging ()
108
+ with (
109
+ open (expected_output_bundle , "r" ) as bundle_file ,
110
+ open (artifact , "rb" ) as input_file ,
111
+ ):
112
+ bundle = Bundle .from_json (bundle_file .read ())
113
+ expected_output_bundle .unlink ()
114
+ verifier .verify_artifact (
115
+ input_ = input_file .read (), bundle = bundle , policy = UnsafeNoOp ()
116
+ )
117
+
118
+
84
119
@pytest .mark .staging
85
120
@pytest .mark .ambient_oidc
86
121
def test_sign_success_custom_outputs (capsys , sigstore , asset_integration , tmp_path ):
0 commit comments