| 112 | } |
| 113 | |
| 114 | func (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 | } |
| 130 | func (s *testSuite) TestChecksumVerificationEnabled() { |
| 131 | testCases := []struct { |
| 132 | name string |