use of com.yahoo.container.core.identity.IdentityConfig in project vespa by vespa-engine.
the class IdentityBuilderTest method identity_config_produced_from_deployment_spec.
@Test
public void identity_config_produced_from_deployment_spec() throws IOException, SAXException {
Element clusterElem = DomBuilderTest.parse("<jdisc id='default' version='1.0'><search /></jdisc>");
String deploymentXml = "<deployment version='1.0' athenz-domain='domain' athenz-service='service'>\n" + " <test/>\n" + " <prod>\n" + " <region active='true'>default</region>\n" + " </prod>\n" + "</deployment>\n";
ApplicationPackage applicationPackage = new MockApplicationPackage.Builder().withDeploymentSpec(deploymentXml).build();
createModel(root, DeployState.createTestState(applicationPackage), clusterElem);
IdentityConfig identityConfig = root.getConfig(IdentityConfig.class, "default/component/" + IdentityProvider.CLASS);
assertEquals("domain", identityConfig.domain());
assertEquals("service", identityConfig.service());
}
Aggregations