Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 1fce79d

Browse files
author
Rob Rati
committed
Updates for latest api changes
1 parent 602be25 commit 1fce79d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pkg/controller/bucket/bucket_controller_test.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import (
3232
utilversion "k8s.io/apimachinery/pkg/util/version"
3333
"k8s.io/apimachinery/pkg/version"
3434

35+
corev1 "k8s.io/api/core/v1"
36+
3537
fakediscovery "k8s.io/client-go/discovery/fake"
3638
fakekubeclientset "k8s.io/client-go/kubernetes/fake"
3739

@@ -132,8 +134,8 @@ func TestAddValidProtocols(t *testing.T) {
132134
if in.BucketName != bucketName {
133135
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
134136
}
135-
if in.Region != region {
136-
t.Errorf("expected %s, got %s", region, in.Region)
137+
if in.BucketContext["Region"] != region {
138+
t.Errorf("expected %s, got %s", region, in.BucketContext["Region"])
137139
}
138140
if in.BucketContext["Version"] != protocolVersion {
139141
t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"])
@@ -273,7 +275,7 @@ func TestAddInvalidProtocol(t *testing.T) {
273275

274276
b := v1alpha1.Bucket{
275277
Spec: v1alpha1.BucketSpec{
276-
BucketRequest: &v1alpha1.ObjectReference{
278+
BucketRequest: &corev1.ObjectReference{
277279
Name: bucketName,
278280
},
279281
Provisioner: provisioner,
@@ -351,8 +353,8 @@ func TestDeleteValidProtocols(t *testing.T) {
351353
if in.BucketName != bucketName {
352354
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
353355
}
354-
if in.Region != region {
355-
t.Errorf("expected %s, got %s", region, in.Region)
356+
if in.BucketContext["Region"] != region {
357+
t.Errorf("expected %s, got %s", region, in.BucketContext["Region"])
356358
}
357359
if in.BucketContext["Version"] != protocolVersion {
358360
t.Errorf("expected %s, got %s", protocolVersion, in.BucketContext["Version"])
@@ -466,7 +468,7 @@ func TestDeleteInvalidProtocol(t *testing.T) {
466468

467469
b := v1alpha1.Bucket{
468470
Spec: v1alpha1.BucketSpec{
469-
BucketRequest: &v1alpha1.ObjectReference{
471+
BucketRequest: &corev1.ObjectReference{
470472
Name: bucketName,
471473
},
472474
Provisioner: provisioner,

0 commit comments

Comments
 (0)