@@ -79,6 +79,16 @@ func TestLoadConfig(t *testing.T) {
7979 require .Equal (t , "auth-token" , cfg .AuthTokenSecretKey )
8080 require .Equal (t , int64 (600 ), cfg .AcmeTxtRecordTTL )
8181 })
82+
83+ t .Run ("custom service account base url" , func (t * testing.T ) {
84+ t .Parallel ()
85+
86+ rawCfg := & v1.JSON {Raw : []byte (`{"projectId":"test", "authTokenSecretNamespace": "test", "serviceAccountBaseUrl": "https://custom.stackit.cloud/dns"}` )}
87+ cfg , err := d .LoadConfig (rawCfg )
88+ require .NoError (t , err )
89+ require .Equal (t , "test" , cfg .ProjectId )
90+ require .Equal (t , "https://custom.stackit.cloud/dns" , cfg .ServiceAccountBaseUrl )
91+ })
8292}
8393
8494func TestDefaultConfigProvider_LoadConfigNamespaceFile (t * testing.T ) {
@@ -152,13 +162,15 @@ func TestGetRepositoryConfig_WithSaKeyPath(t *testing.T) {
152162 }
153163
154164 cfg := & StackitDnsProviderConfig {
155- ApiBasePath : "https://api.stackit.cloud" ,
156- ProjectId : "test-project" ,
165+ ApiBasePath : "https://api.stackit.cloud" ,
166+ ProjectId : "test-project" ,
167+ ServiceAccountBaseUrl : "https://sa-custom.stackit.cloud" ,
157168 }
158169
159170 config , err := r .getRepositoryConfig (cfg )
160171 require .NoError (t , err )
161172 require .Equal (t , saKeyPath , config .SaKeyPath )
173+ require .Equal (t , "https://sa-custom.stackit.cloud" , config .ServiceAccountBaseUrl )
162174 require .True (t , config .UseSaKey )
163175}
164176
0 commit comments