MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / TestDescribe

Method TestDescribe

pkg/blobmanager/s3/backend_test.go:114–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114func (s *testSuite) TestDescribe() {
115 s.T().Run("doesn't exist", func(t *testing.T) {
116 artifact, err := s.backend.Describe(context.Background(), "aabbccddeeff")
117 s.Error(err)
118 s.True(backend.IsNotFound(err))
119 s.Nil(artifact)
120 })
121
122 s.T().Run("found", func(t *testing.T) {
123 artifact, err := s.backend.Describe(context.Background(), s.ownedObjectDigest)
124 s.NoError(err)
125 s.Equal("test.txt", artifact.FileName)
126 s.Equal(s.ownedObjectDigest, artifact.Digest)
127 s.Equal(int64(4), artifact.Size)
128 })
129}
130func (s *testSuite) TestChecksumVerificationEnabled() {
131 testCases := []struct {
132 name string

Callers

nothing calls this directly

Calls 3

DescribeMethod · 0.65
ErrorMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected