3535 releaseName: placeholder
3636 values: {}
3737`
38+ baseDomain = "portal.dev.local"
3839)
3940
4041func newClientMock (t * testing.T , setup func (m * mocks.MockClient )) * mocks.MockClient {
@@ -174,7 +175,7 @@ func TestRealmSubroutine_ProcessAndFinalize(t *testing.T) {
174175
175176 repository , helmRelease = trim (repoYAML ), trim (helmReleaseYAML )
176177
177- rs := NewRealmSubroutine (clientMock )
178+ rs := NewRealmSubroutine (clientMock , baseDomain )
178179 lc := & kcpv1alpha1.LogicalCluster {}
179180 lc .Annotations = map [string ]string {"kcp.io/path" : "root:orgs:test" }
180181 res , opErr := rs .Process (context .Background (), lc )
@@ -190,7 +191,7 @@ func TestRealmSubroutine_ProcessAndFinalize(t *testing.T) {
190191 })
191192
192193 repository , helmRelease = trim (repoYAML ), trim (helmReleaseYAML )
193- rs := NewRealmSubroutine (clientMock )
194+ rs := NewRealmSubroutine (clientMock , baseDomain )
194195 lc := & kcpv1alpha1.LogicalCluster {}
195196 lc .Annotations = map [string ]string {"kcp.io/path" : "root:orgs:test" }
196197 res , opErr := rs .Process (context .Background (), lc )
@@ -201,7 +202,7 @@ func TestRealmSubroutine_ProcessAndFinalize(t *testing.T) {
201202 t .Run ("missing workspace annotation" , func (t * testing.T ) {
202203 t .Parallel ()
203204 clientMock := newClientMock (t , nil )
204- rs := NewRealmSubroutine (clientMock )
205+ rs := NewRealmSubroutine (clientMock , baseDomain )
205206 lc := & kcpv1alpha1.LogicalCluster {}
206207 res , opErr := rs .Process (context .Background (), lc )
207208 require .NotNil (t , opErr )
@@ -246,7 +247,7 @@ func TestRealmSubroutine_ProcessAndFinalize(t *testing.T) {
246247 t .Run (tc .name , func (t * testing.T ) {
247248 t .Parallel ()
248249 clientMock := newClientMock (t , tc .setupMocks )
249- rs := NewRealmSubroutine (clientMock )
250+ rs := NewRealmSubroutine (clientMock , baseDomain )
250251 lc := & kcpv1alpha1.LogicalCluster {}
251252 lc .Annotations = map [string ]string {"kcp.io/path" : "root:orgs:test" }
252253 res , opErr := rs .Finalize (context .Background (), lc )
0 commit comments