Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/cli/pkg/action/attestation_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ func TestParseContractV2(t *testing.T) {
assert.Greater(t, len(spec.GetEnvAllowList()), 0, "Should have env allow list")
assert.NotNil(t, spec.GetRunner(), "Should have runner config")

// Verify annotations in metadata
annotations := result.GetMetadata().GetAnnotations()
assert.NotEmpty(t, annotations, "Should have metadata annotations")
// Verify annotations in spec
annotations := spec.GetAnnotations()
assert.NotEmpty(t, annotations, "Should have annotations")
} else {
assert.Nil(t, result, "Expected V2 schema parsing to fail")
}
Expand Down
8 changes: 5 additions & 3 deletions app/cli/pkg/action/testdata/contract_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ kind: Contract
metadata:
name: test-contract-v2
description: Test contract in V2 format
annotations:
version: "1.0.0"
team: test-team
spec:
annotations:
- name: version
value: "1.0.0"
- name: team
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work by only providing the name not the value, so the value is recovered at runtime?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the annotation value is required if it wasn't provided in the contract

$ cl att push
WRN API contacted in insecure mode
ERR annotations ["environment"] required

value: test-team
materials:
- type: CONTAINER_IMAGE
name: skynet-control-plane
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading