Skip to content

Commit 9e30a4c

Browse files
committed
test: add gateway exporter tests
Signed-off-by: Justin Chadwell <me@jedevc.com>
1 parent dcbb8ac commit 9e30a4c

File tree

6 files changed

+946
-3
lines changed

6 files changed

+946
-3
lines changed

.github/workflows/buildkit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
- binaries
113113
with:
114114
cache_scope: build-integration-tests
115-
pkgs: ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
115+
pkgs: ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend ./exporter
116116
kinds: integration
117117
codecov_flags: core
118118
includes: |

exporter/attestation/make.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func MakeInTotoStatements(ctx context.Context, s session.Group, attestations []e
7070

7171
switch att.Kind {
7272
case gatewaypb.AttestationKind_InToto:
73-
stmt, err := makeInTotoStatement(content, att, defaultSubjects)
73+
stmt, err := MakeInTotoStatement(content, att, defaultSubjects)
7474
if err != nil {
7575
return err
7676
}
@@ -87,7 +87,7 @@ func MakeInTotoStatements(ctx context.Context, s session.Group, attestations []e
8787
return statements, nil
8888
}
8989

90-
func makeInTotoStatement(content []byte, attestation exporter.Attestation, defaultSubjects []intoto.Subject) (*intoto.Statement, error) {
90+
func MakeInTotoStatement[T any](content []byte, attestation result.Attestation[T], defaultSubjects []intoto.Subject) (*intoto.Statement, error) {
9191
if len(attestation.InToto.Subjects) == 0 {
9292
attestation.InToto.Subjects = []result.InTotoSubject{{
9393
Kind: gatewaypb.InTotoSubjectKind_Self,

0 commit comments

Comments
 (0)