Skip to content

Commit 705355f

Browse files
committed
re-inserted unit test in its previous components reduced by the SetCredentials verification parts
1 parent 019d248 commit 705355f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/test/groovy/com/cloudogu/gitops/features/JenkinsTest.groovy

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,29 @@ me:x:1000:''')
266266
assertThat(config.jenkins.url).endsWith('192.168.16.2:42')
267267
}
268268

269+
@Test
270+
void 'Handles two registries'() {
271+
config.registry.twoRegistries = true
272+
config.content.examples = true
273+
config.application.namePrefix = 'my-prefix-'
274+
config.application.namePrefixForEnvVars = 'MY_PREFIX_'
275+
276+
config.registry.url = 'reg-url'
277+
config.registry.path = 'reg-path'
278+
config.registry.username = 'reg-usr'
279+
config.registry.password = 'reg-pw'
280+
config.registry.proxyUrl = 'reg-proxy-url'
281+
config.registry.proxyUsername = 'reg-proxy-usr'
282+
config.registry.proxyPassword = 'reg-proxy-pw'
283+
284+
createJenkins().install()
285+
286+
verify(globalPropertyManager).setGlobalProperty('MY_PREFIX_REGISTRY_PROXY_URL', 'reg-proxy-url')
287+
288+
verify(globalPropertyManager).setGlobalProperty(eq('MY_PREFIX_REGISTRY_URL'), anyString())
289+
verify(globalPropertyManager).setGlobalProperty(eq('MY_PREFIX_REGISTRY_PATH'), anyString())
290+
}
291+
269292
@Test
270293
void 'Does not create create job credentials when argo cd is deactivated'() {
271294
config.application.namePrefixForEnvVars = 'MY_PREFIX_'

0 commit comments

Comments
 (0)