Skip to content

Commit

Permalink
Merge pull request #816 from fluxcd/test-suite-fixes
Browse files Browse the repository at this point in the history
Address minor issues
  • Loading branch information
hiddeco authored Nov 24, 2023
2 parents b8d6523 + e4d19b8 commit 3f431e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ spec:
{{- if .Values.branch }}
branch: "{{ .Values.branch }}"
{{- end}}
{{- if .Values.branch }}
{{- if .Values.tag }}
tag: "{{ .Values.tag }}"
{{- end}}
2 changes: 1 addition & 1 deletion internal/action/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func Upgrade(ctx context.Context, config *helmaction.Configuration, obj *v2.Helm
vals helmchartutil.Values, opts ...UpgradeOption) (*helmrelease.Release, error) {
upgrade := newUpgrade(config, obj, opts)

policy, err := crdPolicyOrDefault(obj.GetInstall().CRDs)
policy, err := crdPolicyOrDefault(obj.GetUpgrade().CRDs)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/helmrelease_controller_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/yaml"

"github.com/fluxcd/pkg/runtime/patch"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"

v2 "github.com/fluxcd/helm-controller/api/v2beta2"
Expand Down Expand Up @@ -90,13 +91,12 @@ other: values
&hc,
}

c := fake.NewClientBuilder().WithScheme(scheme).WithObjects(resources...).Build()
c := fake.NewClientBuilder().WithScheme(scheme).WithStatusSubresource(&v2.HelmRelease{}).WithObjects(resources...).Build()
r := &HelmReleaseReconciler{
Client: c,
EventRecorder: &DummyRecorder{},
}

_, _, _ = r.reconcile(logr.NewContext(context.TODO(), logr.Discard()), hr)
_, _ = r.reconcileRelease(logr.NewContext(context.TODO(), logr.Discard()), patch.NewSerialPatcher(&hr, c), &hr)
})
}

Expand Down

0 comments on commit 3f431e1

Please sign in to comment.