Skip to content

Commit 9e789f6

Browse files
committed
Extract storage operations to a dedicated package
Signed-off-by: Stefan Prodan <[email protected]>
1 parent ac8ec2e commit 9e789f6

30 files changed

+116
-1127
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ RUN go mod download
2626

2727
# Copy source code
2828
COPY main.go main.go
29-
COPY pkg/ pkg/
3029
COPY internal/ internal/
3130

3231
ARG TARGETPLATFORM

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/Masterminds/semver/v3 v3.3.1
2323
github.com/cyphar/filepath-securejoin v0.4.1
2424
github.com/distribution/distribution/v3 v3.0.0
25-
github.com/docker/cli v28.3.2+incompatible
25+
github.com/docker/cli v28.3.3+incompatible
2626
github.com/docker/go-units v0.5.0
2727
github.com/elazarl/goproxy v1.7.2
2828
github.com/fluxcd/cli-utils v0.36.0-flux.14
@@ -37,7 +37,7 @@ require (
3737
github.com/fluxcd/pkg/http/transport v0.6.0
3838
github.com/fluxcd/pkg/lockedfile v0.6.0
3939
github.com/fluxcd/pkg/masktoken v0.7.0
40-
github.com/fluxcd/pkg/oci v0.51.0
40+
github.com/fluxcd/pkg/oci v0.52.0
4141
github.com/fluxcd/pkg/runtime v0.78.0
4242
github.com/fluxcd/pkg/sourceignore v0.13.0
4343
github.com/fluxcd/pkg/ssh v0.20.0
@@ -182,7 +182,7 @@ require (
182182
github.com/dimchansky/utfbom v1.1.1 // indirect
183183
github.com/distribution/reference v0.6.0 // indirect
184184
github.com/docker/distribution v2.8.3+incompatible // indirect
185-
github.com/docker/docker v28.2.2+incompatible // indirect
185+
github.com/docker/docker v28.3.3+incompatible // indirect
186186
github.com/docker/docker-credential-helpers v0.9.3 // indirect
187187
github.com/docker/go-connections v0.5.0 // indirect
188188
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,12 @@ github.com/distribution/distribution/v3 v3.0.0 h1:q4R8wemdRQDClzoNNStftB2ZAfqOiN
321321
github.com/distribution/distribution/v3 v3.0.0/go.mod h1:tRNuFoZsUdyRVegq8xGNeds4KLjwLCRin/tTo6i1DhU=
322322
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
323323
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
324-
github.com/docker/cli v28.3.2+incompatible h1:mOt9fcLE7zaACbxW1GeS65RI67wIJrTnqS3hP2huFsY=
325-
github.com/docker/cli v28.3.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
324+
github.com/docker/cli v28.3.3+incompatible h1:fp9ZHAr1WWPGdIWBM1b3zLtgCF+83gRdVMTJsUeiyAo=
325+
github.com/docker/cli v28.3.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
326326
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
327327
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
328-
github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw=
329-
github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
328+
github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI=
329+
github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
330330
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
331331
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
332332
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
@@ -396,8 +396,8 @@ github.com/fluxcd/pkg/lockedfile v0.6.0 h1:64RRMiPv3ZK9Y4sjI8c78kZAdfEo+Sjr2iP8a
396396
github.com/fluxcd/pkg/lockedfile v0.6.0/go.mod h1:gpdUVm7+05NIT1ZvzuNnHfnT81OhZtIySlxxkZ68pXk=
397397
github.com/fluxcd/pkg/masktoken v0.7.0 h1:pitmyOg2pUVdW+nn2Lk/xqm2TaA08uxvOC0ns3sz6bM=
398398
github.com/fluxcd/pkg/masktoken v0.7.0/go.mod h1:Lc1uoDjO1GY6+YdkK+ZqqBIBWquyV58nlSJ5S1N1IYU=
399-
github.com/fluxcd/pkg/oci v0.51.0 h1:9oYnm+T4SCVSBif9gn80ALJkMGSERabVMDJiaMIdr7Y=
400-
github.com/fluxcd/pkg/oci v0.51.0/go.mod h1:5J6IhHoDVYCVeBEC+4E3nPeKh7d0kjJ8IEL6NVCiTx4=
399+
github.com/fluxcd/pkg/oci v0.52.0 h1:rkHMtXYm21MtDrjNcR5KScqOe6C1JHPExoShuVdNm8M=
400+
github.com/fluxcd/pkg/oci v0.52.0/go.mod h1:5J6IhHoDVYCVeBEC+4E3nPeKh7d0kjJ8IEL6NVCiTx4=
401401
github.com/fluxcd/pkg/runtime v0.78.0 h1:xwNZqnazmgURGuLiHDbzST6BI5K9fvZuNS4eMVY35Es=
402402
github.com/fluxcd/pkg/runtime v0.78.0/go.mod h1:iGhdaEq+lMJQTJNAFEPOU4gUJ7kt3yeDcJPZy7O9IUw=
403403
github.com/fluxcd/pkg/sourceignore v0.13.0 h1:ZvkzX2WsmyZK9cjlqOFFW1onHVzhPZIqDbCh96rPqbU=

internal/controller/bucket_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import (
6464
"github.com/fluxcd/source-controller/internal/index"
6565
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
6666
"github.com/fluxcd/source-controller/internal/reconcile/summarize"
67+
"github.com/fluxcd/source-controller/internal/storage"
6768
)
6869

6970
// maxConcurrentBucketFetches is the upper bound on the goroutines used to
@@ -127,7 +128,7 @@ type BucketReconciler struct {
127128
kuberecorder.EventRecorder
128129
helper.Metrics
129130

130-
Storage *Storage
131+
Storage *storage.Storage
131132
ControllerName string
132133
TokenCache *cache.TokenCache
133134

internal/controller/bucket_controller_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ import (
5050
s3mock "github.com/fluxcd/source-controller/internal/mock/s3"
5151
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
5252
"github.com/fluxcd/source-controller/internal/reconcile/summarize"
53+
"github.com/fluxcd/source-controller/internal/storage"
5354
)
5455

5556
// Environment variable to set the GCP Storage host for the GCP client.
@@ -196,7 +197,7 @@ func TestBucketReconciler_Reconcile(t *testing.T) {
196197
func TestBucketReconciler_reconcileStorage(t *testing.T) {
197198
tests := []struct {
198199
name string
199-
beforeFunc func(obj *sourcev1.Bucket, storage *Storage) error
200+
beforeFunc func(obj *sourcev1.Bucket, storage *storage.Storage) error
200201
want sreconcile.Result
201202
wantErr bool
202203
assertArtifact *sourcev1.Artifact
@@ -205,7 +206,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
205206
}{
206207
{
207208
name: "garbage collects",
208-
beforeFunc: func(obj *sourcev1.Bucket, storage *Storage) error {
209+
beforeFunc: func(obj *sourcev1.Bucket, storage *storage.Storage) error {
209210
revisions := []string{"a", "b", "c", "d"}
210211
for n := range revisions {
211212
v := revisions[n]
@@ -255,7 +256,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
255256
},
256257
{
257258
name: "notices missing artifact in storage",
258-
beforeFunc: func(obj *sourcev1.Bucket, storage *Storage) error {
259+
beforeFunc: func(obj *sourcev1.Bucket, storage *storage.Storage) error {
259260
obj.Status.Artifact = &sourcev1.Artifact{
260261
Path: "/reconcile-storage/invalid.txt",
261262
Revision: "d",
@@ -274,7 +275,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
274275
},
275276
{
276277
name: "notices empty artifact digest",
277-
beforeFunc: func(obj *sourcev1.Bucket, storage *Storage) error {
278+
beforeFunc: func(obj *sourcev1.Bucket, storage *storage.Storage) error {
278279
f := "empty-digest.txt"
279280

280281
obj.Status.Artifact = &sourcev1.Artifact{
@@ -305,7 +306,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
305306
},
306307
{
307308
name: "notices artifact digest mismatch",
308-
beforeFunc: func(obj *sourcev1.Bucket, storage *Storage) error {
309+
beforeFunc: func(obj *sourcev1.Bucket, storage *storage.Storage) error {
309310
f := "digest-mismatch.txt"
310311

311312
obj.Status.Artifact = &sourcev1.Artifact{
@@ -336,7 +337,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) {
336337
},
337338
{
338339
name: "updates hostname on diff from current",
339-
beforeFunc: func(obj *sourcev1.Bucket, storage *Storage) error {
340+
beforeFunc: func(obj *sourcev1.Bucket, storage *storage.Storage) error {
340341
obj.Status.Artifact = &sourcev1.Artifact{
341342
Path: "/reconcile-storage/hostname.txt",
342343
Revision: "f",

internal/controller/gitrepository_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import (
6666
"github.com/fluxcd/source-controller/internal/features"
6767
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
6868
"github.com/fluxcd/source-controller/internal/reconcile/summarize"
69+
"github.com/fluxcd/source-controller/internal/storage"
6970
"github.com/fluxcd/source-controller/internal/util"
7071
)
7172

@@ -131,7 +132,7 @@ type GitRepositoryReconciler struct {
131132
kuberecorder.EventRecorder
132133
helper.Metrics
133134

134-
Storage *Storage
135+
Storage *storage.Storage
135136
ControllerName string
136137
TokenCache *cache.TokenCache
137138

@@ -868,7 +869,7 @@ func (r *GitRepositoryReconciler) reconcileArtifact(ctx context.Context, sp *pat
868869
}
869870

870871
// Archive directory to storage
871-
if err := r.Storage.Archive(&artifact, dir, SourceIgnoreFilter(ps, ignoreDomain)); err != nil {
872+
if err := r.Storage.Archive(&artifact, dir, storage.SourceIgnoreFilter(ps, ignoreDomain)); err != nil {
872873
e := serror.NewGeneric(
873874
fmt.Errorf("unable to archive artifact to storage: %w", err),
874875
sourcev1.ArchiveOperationFailedReason,

internal/controller/gitrepository_controller_fuzz_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import (
6464
"github.com/fluxcd/pkg/runtime/testenv"
6565

6666
sourcev1 "github.com/fluxcd/source-controller/api/v1"
67+
intstorage "github.com/fluxcd/source-controller/internal/storage"
6768
)
6869

6970
var (
@@ -77,7 +78,7 @@ var (
7778
cfg *rest.Config
7879
testEnv *testenv.Environment
7980

80-
storage *Storage
81+
storage *intstorage.Storage
8182

8283
examplePublicKey []byte
8384
examplePrivateKey []byte
@@ -477,7 +478,7 @@ func startEnvServer(setupReconcilers func(manager.Manager)) *envtest.Environment
477478
panic(err)
478479
}
479480
defer os.RemoveAll(tmpStoragePath)
480-
storage, err = NewStorage(tmpStoragePath, "localhost:5050", time.Minute*1, 2)
481+
storage, err = intstorage.New(tmpStoragePath, "localhost:5050", time.Minute*1, 2)
481482
if err != nil {
482483
panic(err)
483484
}

internal/controller/gitrepository_controller_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import (
6363
"github.com/fluxcd/source-controller/internal/features"
6464
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
6565
"github.com/fluxcd/source-controller/internal/reconcile/summarize"
66+
"github.com/fluxcd/source-controller/internal/storage"
6667
)
6768

6869
const (
@@ -1531,7 +1532,7 @@ func TestGitRepositoryReconciler_reconcileInclude(t *testing.T) {
15311532
func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) {
15321533
tests := []struct {
15331534
name string
1534-
beforeFunc func(obj *sourcev1.GitRepository, storage *Storage) error
1535+
beforeFunc func(obj *sourcev1.GitRepository, storage *storage.Storage) error
15351536
want sreconcile.Result
15361537
wantErr bool
15371538
assertArtifact *sourcev1.Artifact
@@ -1540,7 +1541,7 @@ func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) {
15401541
}{
15411542
{
15421543
name: "garbage collects",
1543-
beforeFunc: func(obj *sourcev1.GitRepository, storage *Storage) error {
1544+
beforeFunc: func(obj *sourcev1.GitRepository, storage *storage.Storage) error {
15441545
revisions := []string{"a", "b", "c", "d"}
15451546
for n := range revisions {
15461547
v := revisions[n]
@@ -1590,7 +1591,7 @@ func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) {
15901591
},
15911592
{
15921593
name: "notices missing artifact in storage",
1593-
beforeFunc: func(obj *sourcev1.GitRepository, storage *Storage) error {
1594+
beforeFunc: func(obj *sourcev1.GitRepository, storage *storage.Storage) error {
15941595
obj.Status.Artifact = &sourcev1.Artifact{
15951596
Path: "/reconcile-storage/invalid.txt",
15961597
Revision: "e",
@@ -1609,7 +1610,7 @@ func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) {
16091610
},
16101611
{
16111612
name: "notices empty artifact digest",
1612-
beforeFunc: func(obj *sourcev1.GitRepository, storage *Storage) error {
1613+
beforeFunc: func(obj *sourcev1.GitRepository, storage *storage.Storage) error {
16131614
f := "empty-digest.txt"
16141615

16151616
obj.Status.Artifact = &sourcev1.Artifact{
@@ -1640,7 +1641,7 @@ func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) {
16401641
},
16411642
{
16421643
name: "notices artifact digest mismatch",
1643-
beforeFunc: func(obj *sourcev1.GitRepository, storage *Storage) error {
1644+
beforeFunc: func(obj *sourcev1.GitRepository, storage *storage.Storage) error {
16441645
f := "digest-mismatch.txt"
16451646

16461647
obj.Status.Artifact = &sourcev1.Artifact{
@@ -1671,7 +1672,7 @@ func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) {
16711672
},
16721673
{
16731674
name: "updates hostname on diff from current",
1674-
beforeFunc: func(obj *sourcev1.GitRepository, storage *Storage) error {
1675+
beforeFunc: func(obj *sourcev1.GitRepository, storage *storage.Storage) error {
16751676
obj.Status.Artifact = &sourcev1.Artifact{
16761677
Path: "/reconcile-storage/hostname.txt",
16771678
Revision: "f",

internal/controller/helmchart_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import (
7575
"github.com/fluxcd/source-controller/internal/oci/notation"
7676
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
7777
"github.com/fluxcd/source-controller/internal/reconcile/summarize"
78+
"github.com/fluxcd/source-controller/internal/storage"
7879
"github.com/fluxcd/source-controller/internal/util"
7980
)
8081

@@ -132,7 +133,7 @@ type HelmChartReconciler struct {
132133
helper.Metrics
133134

134135
RegistryClientGenerator RegistryClientGeneratorFunc
135-
Storage *Storage
136+
Storage *storage.Storage
136137
Getters helmgetter.Providers
137138
ControllerName string
138139

internal/controller/helmchart_controller_test.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import (
7575
snotation "github.com/fluxcd/source-controller/internal/oci/notation"
7676
sreconcile "github.com/fluxcd/source-controller/internal/reconcile"
7777
"github.com/fluxcd/source-controller/internal/reconcile/summarize"
78+
"github.com/fluxcd/source-controller/internal/storage"
7879
)
7980

8081
func TestHelmChartReconciler_deleteBeforeFinalizer(t *testing.T) {
@@ -330,7 +331,7 @@ func TestHelmChartReconciler_Reconcile(t *testing.T) {
330331
func TestHelmChartReconciler_reconcileStorage(t *testing.T) {
331332
tests := []struct {
332333
name string
333-
beforeFunc func(obj *sourcev1.HelmChart, storage *Storage) error
334+
beforeFunc func(obj *sourcev1.HelmChart, storage *storage.Storage) error
334335
want sreconcile.Result
335336
wantErr bool
336337
assertArtifact *sourcev1.Artifact
@@ -339,7 +340,7 @@ func TestHelmChartReconciler_reconcileStorage(t *testing.T) {
339340
}{
340341
{
341342
name: "garbage collects",
342-
beforeFunc: func(obj *sourcev1.HelmChart, storage *Storage) error {
343+
beforeFunc: func(obj *sourcev1.HelmChart, storage *storage.Storage) error {
343344
revisions := []string{"a", "b", "c", "d"}
344345
for n := range revisions {
345346
v := revisions[n]
@@ -389,7 +390,7 @@ func TestHelmChartReconciler_reconcileStorage(t *testing.T) {
389390
},
390391
{
391392
name: "notices missing artifact in storage",
392-
beforeFunc: func(obj *sourcev1.HelmChart, storage *Storage) error {
393+
beforeFunc: func(obj *sourcev1.HelmChart, storage *storage.Storage) error {
393394
obj.Status.Artifact = &sourcev1.Artifact{
394395
Path: "/reconcile-storage/invalid.txt",
395396
Revision: "d",
@@ -408,7 +409,7 @@ func TestHelmChartReconciler_reconcileStorage(t *testing.T) {
408409
},
409410
{
410411
name: "notices empty artifact digest",
411-
beforeFunc: func(obj *sourcev1.HelmChart, storage *Storage) error {
412+
beforeFunc: func(obj *sourcev1.HelmChart, storage *storage.Storage) error {
412413
f := "empty-digest.txt"
413414

414415
obj.Status.Artifact = &sourcev1.Artifact{
@@ -439,7 +440,7 @@ func TestHelmChartReconciler_reconcileStorage(t *testing.T) {
439440
},
440441
{
441442
name: "notices artifact digest mismatch",
442-
beforeFunc: func(obj *sourcev1.HelmChart, storage *Storage) error {
443+
beforeFunc: func(obj *sourcev1.HelmChart, storage *storage.Storage) error {
443444
f := "digest-mismatch.txt"
444445

445446
obj.Status.Artifact = &sourcev1.Artifact{
@@ -470,7 +471,7 @@ func TestHelmChartReconciler_reconcileStorage(t *testing.T) {
470471
},
471472
{
472473
name: "updates hostname on diff from current",
473-
beforeFunc: func(obj *sourcev1.HelmChart, storage *Storage) error {
474+
beforeFunc: func(obj *sourcev1.HelmChart, storage *storage.Storage) error {
474475
obj.Status.Artifact = &sourcev1.Artifact{
475476
Path: "/reconcile-storage/hostname.txt",
476477
Revision: "f",
@@ -568,7 +569,7 @@ func TestHelmChartReconciler_reconcileSource(t *testing.T) {
568569

569570
tmpDir := t.TempDir()
570571

571-
storage, err := NewStorage(tmpDir, "example.com", retentionTTL, retentionRecords)
572+
storage, err := storage.New(tmpDir, "example.com", retentionTTL, retentionRecords)
572573
g.Expect(err).ToNot(HaveOccurred())
573574

574575
gitArtifact := &sourcev1.Artifact{
@@ -1185,7 +1186,7 @@ func TestHelmChartReconciler_buildFromOCIHelmRepository(t *testing.T) {
11851186
metadata, err := loadTestChartToOCI(chartData, testRegistryServer, "", "", "")
11861187
g.Expect(err).NotTo(HaveOccurred())
11871188

1188-
storage, err := NewStorage(tmpDir, "example.com", retentionTTL, retentionRecords)
1189+
storage, err := storage.New(tmpDir, "example.com", retentionTTL, retentionRecords)
11891190
g.Expect(err).ToNot(HaveOccurred())
11901191

11911192
cachedArtifact := &sourcev1.Artifact{
@@ -1408,7 +1409,7 @@ func TestHelmChartReconciler_buildFromTarballArtifact(t *testing.T) {
14081409

14091410
tmpDir := t.TempDir()
14101411

1411-
storage, err := NewStorage(tmpDir, "example.com", retentionTTL, retentionRecords)
1412+
storage, err := storage.New(tmpDir, "example.com", retentionTTL, retentionRecords)
14121413
g.Expect(err).ToNot(HaveOccurred())
14131414

14141415
chartsArtifact := &sourcev1.Artifact{
@@ -2884,7 +2885,7 @@ func TestHelmChartReconciler_reconcileSourceFromOCI_verifySignatureNotation(t *t
28842885
metadata, err := loadTestChartToOCI(chartData, server, "", "", "")
28852886
g.Expect(err).NotTo(HaveOccurred())
28862887

2887-
storage, err := NewStorage(tmpDir, server.registryHost, retentionTTL, retentionRecords)
2888+
storage, err := storage.New(tmpDir, server.registryHost, retentionTTL, retentionRecords)
28882889
g.Expect(err).ToNot(HaveOccurred())
28892890

28902891
cachedArtifact := &sourcev1.Artifact{
@@ -3208,7 +3209,7 @@ func TestHelmChartReconciler_reconcileSourceFromOCI_verifySignatureCosign(t *tes
32083209
metadata, err := loadTestChartToOCI(chartData, server, "", "", "")
32093210
g.Expect(err).NotTo(HaveOccurred())
32103211

3211-
storage, err := NewStorage(tmpDir, server.registryHost, retentionTTL, retentionRecords)
3212+
storage, err := storage.New(tmpDir, server.registryHost, retentionTTL, retentionRecords)
32123213
g.Expect(err).ToNot(HaveOccurred())
32133214

32143215
cachedArtifact := &sourcev1.Artifact{

0 commit comments

Comments
 (0)