diff --git a/go.mod b/go.mod index a6717390..6ac285ce 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/aws/aws-sdk-go v1.44.100 - github.com/codeready-toolchain/api v0.0.0-20231010090546-098b27b43b3a + github.com/codeready-toolchain/api v0.0.0-20231013094356-24443ff2aa9a github.com/codeready-toolchain/toolchain-common v0.0.0-20231012065805-a23f3cfa676d github.com/go-logr/logr v1.2.3 github.com/gofrs/uuid v4.2.0+incompatible diff --git a/go.sum b/go.sum index 39c4178d..12e146c6 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/codeready-toolchain/api v0.0.0-20231010090546-098b27b43b3a h1:UucbKqQ0bz9xe/Hr6kbrJkPK0YzCn2bdFwGme5rCfuU= -github.com/codeready-toolchain/api v0.0.0-20231010090546-098b27b43b3a/go.mod h1:nn3W6eKb9PFIVwSwZW7wDeLACMBOwAV+4kddGuN+ARM= +github.com/codeready-toolchain/api v0.0.0-20231013094356-24443ff2aa9a h1:lbMkf/E687UY6Dbj8yjADmorNdC3a25eDgmhkzdnzc0= +github.com/codeready-toolchain/api v0.0.0-20231013094356-24443ff2aa9a/go.mod h1:bImSKnxrpNmCmW/YEGiiZnZqJm3kAmfP5hW4YndK0hE= github.com/codeready-toolchain/toolchain-common v0.0.0-20231012065805-a23f3cfa676d h1:gQy0fpfCjl4XQhoXEQ3NUrvpRp4qKzov5TBKyePuwOM= github.com/codeready-toolchain/toolchain-common v0.0.0-20231012065805-a23f3cfa676d/go.mod h1:SnZewh0DLwAELKLsW+R6NKaKmiRBuMI1iMYSkfyZG6A= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= diff --git a/pkg/proxy/handlers/spacelister.go b/pkg/proxy/handlers/spacelister.go index 71b5492f..80d05c0d 100644 --- a/pkg/proxy/handlers/spacelister.go +++ b/pkg/proxy/handlers/spacelister.go @@ -296,7 +296,7 @@ func generateWorkspaceBindings(space *toolchainv1alpha1.Space, spaceBindings []t } // this is a binding that was created via SpaceBindingRequest, it can be updated or deleted binding.AvailableActions = []string{UpdateBindingAction, DeleteBindingAction} - binding.BindingRequest = toolchainv1alpha1.BindingRequest{ + binding.BindingRequest = &toolchainv1alpha1.BindingRequest{ Name: sbrName, Namespace: sbrNamespace, } diff --git a/pkg/proxy/handlers/spacelister_test.go b/pkg/proxy/handlers/spacelister_test.go index 23cf4d69..ca345f5f 100644 --- a/pkg/proxy/handlers/spacelister_test.go +++ b/pkg/proxy/handlers/spacelister_test.go @@ -236,7 +236,7 @@ func TestSpaceLister(t *testing.T) { MasterUserRecord: "animelover", Role: "viewer", AvailableActions: []string{"update", "delete"}, - BindingRequest: toolchainv1alpha1.BindingRequest{ // animelover was granted access to dancelover workspace using SpaceBindingRequest + BindingRequest: &toolchainv1alpha1.BindingRequest{ // animelover was granted access to dancelover workspace using SpaceBindingRequest Name: "animelover-sbr", Namespace: "dancelover-tenant", }, @@ -269,7 +269,7 @@ func TestSpaceLister(t *testing.T) { MasterUserRecord: "foodlover", Role: "maintainer", AvailableActions: []string{"update", "delete"}, - BindingRequest: toolchainv1alpha1.BindingRequest{ // foodlover was granted access to movielover workspace using SpaceBindingRequest + BindingRequest: &toolchainv1alpha1.BindingRequest{ // foodlover was granted access to movielover workspace using SpaceBindingRequest Name: "foodlover-sbr", Namespace: "movielover-tenant", }, @@ -327,7 +327,7 @@ func TestSpaceLister(t *testing.T) { MasterUserRecord: "foodlover", Role: "maintainer", AvailableActions: []string{"update", "delete"}, - BindingRequest: toolchainv1alpha1.BindingRequest{ + BindingRequest: &toolchainv1alpha1.BindingRequest{ Name: "foodlover-sbr", Namespace: "movielover-tenant", }, @@ -367,7 +367,7 @@ func TestSpaceLister(t *testing.T) { MasterUserRecord: "foodlover", // foodlover was granted access to movielover workspace using SpaceBindingRequest Role: "maintainer", AvailableActions: []string{"update", "delete"}, - BindingRequest: toolchainv1alpha1.BindingRequest{ + BindingRequest: &toolchainv1alpha1.BindingRequest{ Name: "foodlover-sbr", Namespace: "movielover-tenant", },