Skip to content

Commit

Permalink
Remove normal response in line with new guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
mproffitt committed Nov 16, 2023
1 parent 8c22846 commit 3cc9aea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions fn.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequ
}

if _, ok := ac.composed.ObservedComposed[input.Spec.ClusterRef]; !ok {
response.Normal(rsp, "waiting for resource")
return rsp, nil
}

Expand Down Expand Up @@ -75,6 +74,5 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequ
return
}

response.Normal(rsp, "Successful run")
return rsp, nil
}
18 changes: 0 additions & 18 deletions fn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,6 @@ func TestRunFunction(t *testing.T) {
want: want{
rsp: &fnv1beta1.RunFunctionResponse{
Meta: &fnv1beta1.ResponseMeta{Tag: "hello", Ttl: durationpb.New(response.DefaultTTL)},
Results: []*fnv1beta1.Result{
{
Severity: fnv1beta1.Severity_SEVERITY_NORMAL,
Message: "waiting for resource",
},
},
},
},
mocks: mocks{},
Expand Down Expand Up @@ -613,12 +607,6 @@ func TestRunFunction(t *testing.T) {
want: want{
rsp: &fnv1beta1.RunFunctionResponse{
Meta: &fnv1beta1.ResponseMeta{Ttl: durationpb.New(response.DefaultTTL)},
Results: []*fnv1beta1.Result{
{
Severity: fnv1beta1.Severity_SEVERITY_NORMAL,
Message: "Successful run",
},
},
Desired: &fnv1beta1.State{
Composite: &fnv1beta1.Resource{
Resource: resource.MustStructJSON(xrExample),
Expand Down Expand Up @@ -687,12 +675,6 @@ func TestRunFunction(t *testing.T) {
want: want{
rsp: &fnv1beta1.RunFunctionResponse{
Meta: &fnv1beta1.ResponseMeta{Ttl: durationpb.New(response.DefaultTTL)},
Results: []*fnv1beta1.Result{
{
Severity: fnv1beta1.Severity_SEVERITY_NORMAL,
Message: "Successful run",
},
},
Desired: &fnv1beta1.State{
Composite: &fnv1beta1.Resource{
Resource: resource.MustStructJSON(xrTest),
Expand Down

0 comments on commit 3cc9aea

Please sign in to comment.