summaryrefslogtreecommitdiff
path: root/pkg/sif/descriptor_input_test.go
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2022-11-26 11:30:56 -0500
committerReinhard Tartler <siretart@tauware.de>2022-11-26 11:30:56 -0500
commitd6caca7a938130982d713b6be0ca0823f46b0b4c (patch)
treedc35be0da27e89eb9208a44aabbd24b00df629db /pkg/sif/descriptor_input_test.go
parentdc1634f506b369be461ff65c77b2a804e06df87f (diff)
parentdab73e7c0f7576075e7f073f71cc3f32a656b161 (diff)
Update upstream source from tag 'upstream/2.8.3'
Update to upstream version '2.8.3' with Debian dir 7536ac56d7f18b29fd849f99100170df028e78fe
Diffstat (limited to 'pkg/sif/descriptor_input_test.go')
-rw-r--r--pkg/sif/descriptor_input_test.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/pkg/sif/descriptor_input_test.go b/pkg/sif/descriptor_input_test.go
index 8431231..5c34099 100644
--- a/pkg/sif/descriptor_input_test.go
+++ b/pkg/sif/descriptor_input_test.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2021, Sylabs Inc. All rights reserved.
+// Copyright (c) 2021-2022, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
@@ -163,6 +163,21 @@ func TestNewDescriptorInput(t *testing.T) {
OptSignatureMetadata(crypto.SHA256, fp),
},
},
+ {
+ name: "OptSBOMMetadataUnexpectedDataType",
+ t: DataGeneric,
+ opts: []DescriptorInputOpt{
+ OptSBOMMetadata(SBOMFormatCycloneDXJSON),
+ },
+ wantErr: &unexpectedDataTypeError{DataGeneric, []DataType{DataSBOM}},
+ },
+ {
+ name: "OptSBOMMetadata",
+ t: DataSBOM,
+ opts: []DescriptorInputOpt{
+ OptSBOMMetadata(SBOMFormatCycloneDXJSON),
+ },
+ },
}
for _, tt := range tests {
tt := tt