Skip to content

Commit

Permalink
fix label
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Mendoza committed Mar 12, 2024
1 parent 76d6756 commit ca3f516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions controller/linodeobjectstoragebucket_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ var _ = Describe("LinodeObjectStorageBucket controller", func() {
},
Spec: infrav1.LinodeObjectStorageBucketSpec{
Cluster: "cluster",
Label: util.Pointer("sample"),
},
}

recorder := record.NewFakeRecorder(3)

secretName := fmt.Sprintf(scope.AccessKeyNameTemplate, *obj.Spec.Label)
secretName := fmt.Sprintf(scope.AccessKeyNameTemplate, obj.Name)

var secret corev1.Secret
var mockCtrl *gomock.Controller
Expand All @@ -89,7 +88,7 @@ var _ = Describe("LinodeObjectStorageBucket controller", func() {
createBucketCall := mockClient.EXPECT().
CreateObjectStorageBucket(gomock.Any(), gomock.Any()).
Return(&linodego.ObjectStorageBucket{
Label: *obj.Spec.Label,
Label: obj.Name,
Cluster: obj.Spec.Cluster,
Created: util.Pointer(time.Now()),
Hostname: "hostname",
Expand All @@ -107,7 +106,7 @@ var _ = Describe("LinodeObjectStorageBucket controller", func() {
return false
}

return createOpt.Label == fmt.Sprintf("%s-%s", *obj.Spec.Label, permission)
return createOpt.Label == fmt.Sprintf("%s-%s", obj.Name, permission)
}),
).
Return(&linodego.ObjectStorageKey{ID: idx}, nil).
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/cluster-api v1.6.2
sigs.k8s.io/controller-runtime v0.17.2
)
Expand Down Expand Up @@ -76,7 +77,6 @@ require (
k8s.io/component-base v0.29.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down

0 comments on commit ca3f516

Please sign in to comment.