Skip to content

Commit 85e4aa7

Browse files
Fix missing replace conditions method (#104)
Description of changes: Add the missing `ReplaceConditions` method introduced in aws-controllers-k8s/runtime#24 . Fix a import path error introduced in #102 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent ece6139 commit 85e4aa7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

pkg/generate/mq_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestMQ_GetOutputShapeGoType(t *testing.T) {
6161
crd := testutil.GetCRDByName(t, g, "Broker")
6262
require.NotNil(crd)
6363

64-
exp := "*svcsdkapi.CreateBrokerResponse"
64+
exp := "*svcsdk.CreateBrokerResponse"
6565
otype := crd.GetOutputShapeGoType(crd.Ops.Create)
6666
assert.Equal(exp, otype)
6767
}

pkg/model/crd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ func (r *CRD) SetOutputCustomMethodName(
367367
}
368368

369369
// GetOutputShapeGoType returns the Go type of the supplied operation's Output
370-
// shape, renamed to use the standardized svcsdkapi alias.
370+
// shape, renamed to use the standardized svcsdk alias.
371371
func (r *CRD) GetOutputShapeGoType(
372372
op *awssdkmodel.Operation,
373373
) string {
@@ -376,7 +376,7 @@ func (r *CRD) GetOutputShapeGoType(
376376
}
377377
orig := op.OutputRef.GoType()
378378
// orig will contain "*<OutputShape>" with no package specifier
379-
return "*svcsdkapi." + orig[1:]
379+
return "*svcsdk." + orig[1:]
380380
}
381381

382382
// GetOutputWrapperFieldPath returns the JSON-Path of the output wrapper field

templates/pkg/resource/resource.go.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ func (r *resource) Conditions() []*ackv1alpha1.Condition {
6161
return r.ko.Status.Conditions
6262
}
6363

64+
// ReplaceConditions sets the Conditions status field for the resource
65+
func (r *resource) ReplaceConditions(conditions []*ackv1alpha1.Condition) {
66+
r.ko.Status.Conditions = conditions
67+
}
68+
6469
// SetObjectMeta sets the ObjectMeta field for the resource
6570
func (r *resource) SetObjectMeta(meta metav1.ObjectMeta) {
6671
r.ko.ObjectMeta = meta;

0 commit comments

Comments
 (0)