diff --git a/internal/controller/bucket_controller_test.go b/internal/controller/bucket_controller_test.go index 6ec912dfe..4cf9cbc96 100644 --- a/internal/controller/bucket_controller_test.go +++ b/internal/controller/bucket_controller_test.go @@ -417,7 +417,7 @@ func TestBucketReconciler_reconcileStorage(t *testing.T) { g.Expect(obj.Status.Conditions).To(conditions.MatchConditions(tt.assertConditions)) for _, p := range tt.assertPaths { - absoluteP := filepath.Join(testStorage.BasePath, p) + absoluteP := filepath.Join(testStorage.BasePath, strings.TrimPrefix(p, "!")) if !strings.HasPrefix(p, "!") { g.Expect(absoluteP).To(BeAnExistingFile()) continue diff --git a/internal/controller/gitrepository_controller_test.go b/internal/controller/gitrepository_controller_test.go index 38aadca4d..da868b67d 100644 --- a/internal/controller/gitrepository_controller_test.go +++ b/internal/controller/gitrepository_controller_test.go @@ -1947,7 +1947,7 @@ func TestGitRepositoryReconciler_reconcileStorage(t *testing.T) { g.Expect(obj.Status.Conditions).To(conditions.MatchConditions(tt.assertConditions)) for _, p := range tt.assertPaths { - absoluteP := filepath.Join(testStorage.BasePath, p) + absoluteP := filepath.Join(testStorage.BasePath, strings.TrimPrefix(p, "!")) if !strings.HasPrefix(p, "!") { g.Expect(absoluteP).To(BeAnExistingFile()) continue diff --git a/internal/controller/helmchart_controller_test.go b/internal/controller/helmchart_controller_test.go index 94c6f7de4..e4f32971f 100644 --- a/internal/controller/helmchart_controller_test.go +++ b/internal/controller/helmchart_controller_test.go @@ -553,7 +553,7 @@ func TestHelmChartReconciler_reconcileStorage(t *testing.T) { g.Expect(obj.Status.Conditions).To(conditions.MatchConditions(tt.assertConditions)) for _, p := range tt.assertPaths { - absoluteP := filepath.Join(testStorage.BasePath, p) + absoluteP := filepath.Join(testStorage.BasePath, strings.TrimPrefix(p, "!")) if !strings.HasPrefix(p, "!") { g.Expect(absoluteP).To(BeAnExistingFile()) continue diff --git a/internal/controller/helmrepository_controller_test.go b/internal/controller/helmrepository_controller_test.go index 68f1e77f9..e5266d3af 100644 --- a/internal/controller/helmrepository_controller_test.go +++ b/internal/controller/helmrepository_controller_test.go @@ -407,7 +407,7 @@ func TestHelmRepositoryReconciler_reconcileStorage(t *testing.T) { } for _, p := range tt.assertPaths { - absoluteP := filepath.Join(testStorage.BasePath, p) + absoluteP := filepath.Join(testStorage.BasePath, strings.TrimPrefix(p, "!")) if !strings.HasPrefix(p, "!") { g.Expect(absoluteP).To(BeAnExistingFile()) continue diff --git a/internal/controller/ocirepository_controller_test.go b/internal/controller/ocirepository_controller_test.go index 8907d84d0..a3370f5dc 100644 --- a/internal/controller/ocirepository_controller_test.go +++ b/internal/controller/ocirepository_controller_test.go @@ -3472,7 +3472,7 @@ func TestOCIRepository_reconcileStorage(t *testing.T) { g.Expect(obj.Status.Conditions).To(conditions.MatchConditions(tt.assertConditions)) for _, p := range tt.assertPaths { - absoluteP := filepath.Join(testStorage.BasePath, p) + absoluteP := filepath.Join(testStorage.BasePath, strings.TrimPrefix(p, "!")) if !strings.HasPrefix(p, "!") { g.Expect(absoluteP).To(BeAnExistingFile()) continue