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

Method TestExists

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

Source from the content-addressed store, hash-verified

92}
93
94func (s *testSuite) TestExists() {
95 s.T().Run("doesn't exist", func(t *testing.T) {
96 found, err := s.backend.Exists(context.Background(), "aabbccddeeff")
97 s.NoError(err)
98 s.False(found)
99 })
100
101 s.T().Run("found", func(t *testing.T) {
102 found, err := s.backend.Exists(context.Background(), s.ownedObjectDigest)
103 s.NoError(err)
104 s.True(found)
105 })
106
107 s.T().Run("exists but not uploaded by chainloop", func(t *testing.T) {
108 found, err := s.backend.Exists(context.Background(), s.externalObjectDigest)
109 s.ErrorContains(err, "not uploaded by Chainloop")
110 s.False(found)
111 })
112}
113
114func (s *testSuite) TestDescribe() {
115 s.T().Run("doesn't exist", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

ExistsMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected