Skip to content

Commit 664d5e7

Browse files
Add attest extra args tests
1 parent 921b576 commit 664d5e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bake/hcl_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,8 @@ func TestHCLAttrsCapsuleType(t *testing.T) {
609609
attest = [
610610
{ type = "provenance", mode = "max" },
611611
"type=sbom,disabled=true",
612+
"type=sbom,generator=foo,\"ENV1=bar,baz\"",
613+
"type=sbom,generator=foo,\"ENV1=bar,baz\",ENV2=hello",
612614
]
613615
614616
cache-from = [
@@ -641,7 +643,7 @@ func TestHCLAttrsCapsuleType(t *testing.T) {
641643
require.NoError(t, err)
642644

643645
require.Equal(t, 1, len(c.Targets))
644-
require.Equal(t, []string{"type=provenance,mode=max", "type=sbom,disabled=true"}, stringify(c.Targets[0].Attest))
646+
require.Equal(t, []string{"type=provenance,mode=max", "type=sbom,disabled=true", `type=sbom,generator=foo,"ENV1=bar,baz"`, `type=sbom,ENV1="bar,baz",ENV2=hello,generator=foo`}, stringify(c.Targets[0].Attest))
645647
require.Equal(t, []string{"type=local,dest=../out", "type=oci,dest=../out.tar"}, stringify(c.Targets[0].Outputs))
646648
require.Equal(t, []string{"type=local,src=path/to/cache", "user/app:cache"}, stringify(c.Targets[0].CacheFrom))
647649
require.Equal(t, []string{"type=local,dest=path/to/cache"}, stringify(c.Targets[0].CacheTo))

0 commit comments

Comments
 (0)