File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ func NewMultiTenantRegistry(
7474// forProject() method.
7575func (r * MultiTenantRegistry ) projectRestConfig (projectName string ) * rest.Config {
7676 c := rest .CopyConfig (r .baseConfig )
77- c .Host = strings .TrimSuffix (r .baseConfig .Host , "/" ) + "/projects/" + projectName + "/control-plane"
77+ c .Host = strings .TrimSuffix (r .baseConfig .Host , "/" ) + "/apis/resourcemanager.miloapis.com/v1alpha1/ projects/" + projectName + "/control-plane"
7878 return c
7979}
8080
Original file line number Diff line number Diff line change @@ -160,19 +160,19 @@ func TestMultiTenantRegistry_ProjectRestConfig(t *testing.T) {
160160 name : "base host without trailing slash" ,
161161 baseHost : "https://api.example.com" ,
162162 projectName : "my-project" ,
163- wantHost : "https://api.example.com/projects/my-project/control-plane" ,
163+ wantHost : "https://api.example.com/apis/resourcemanager.miloapis.com/v1alpha1/ projects/my-project/control-plane" ,
164164 },
165165 {
166166 name : "base host with trailing slash" ,
167167 baseHost : "https://api.example.com/" ,
168168 projectName : "my-project" ,
169- wantHost : "https://api.example.com/projects/my-project/control-plane" ,
169+ wantHost : "https://api.example.com/apis/resourcemanager.miloapis.com/v1alpha1/ projects/my-project/control-plane" ,
170170 },
171171 {
172172 name : "base host with path suffix" ,
173173 baseHost : "https://api.example.com/prefix" ,
174174 projectName : "other-project" ,
175- wantHost : "https://api.example.com/prefix/projects/other-project/control-plane" ,
175+ wantHost : "https://api.example.com/prefix/apis/resourcemanager.miloapis.com/v1alpha1/ projects/other-project/control-plane" ,
176176 },
177177 }
178178
You can’t perform that action at this time.
0 commit comments