Skip to content

Commit

Permalink
add verboser logging for observe.go
Browse files Browse the repository at this point in the history
  • Loading branch information
wejdross committed Jan 20, 2025
1 parent 982ecbc commit 1e996b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/release/observe.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func isUpToDate(ctx context.Context, kube client.Client, spec *v1beta1.ReleaseSp
in := spec.ForProvider

if in.Chart.Name != ocm.Name {
return false, nil
return false, fmt.Errorf("expected chart name %s, got %s", in.Chart.Name, ocm.Name)
}

mp := sets.New[xpv1.ManagementAction](spec.ManagementPolicies...)
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/release/observe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package release

import (
"context"
"fmt"
"testing"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
Expand Down Expand Up @@ -230,7 +231,7 @@ func Test_isUpToDate(t *testing.T) {
},
want: want{
out: false,
err: nil,
err: fmt.Errorf("expected chart name %s, got %s", "another-chart", testChart),
},
},
"NotUpToDate_ChartVersionDifferent": {
Expand Down

0 comments on commit 1e996b4

Please sign in to comment.