use of com.yahoo.vespa.hosted.controller.athenz.mock.AthenzClientFactoryMock in project vespa by vespa-engine.
the class ApplicationApiTest method createAthenzDomainWithAdmin.
/**
* In production this happens outside hosted Vespa, so there is no API for it and we need to reach down into the
* mock setup to replicate the action.
*/
private void createAthenzDomainWithAdmin(AthenzDomain domain, UserId userId) {
AthenzClientFactoryMock mock = (AthenzClientFactoryMock) container.components().getComponent(AthenzClientFactoryMock.class.getName());
AthenzDbMock.Domain domainMock = new AthenzDbMock.Domain(domain);
domainMock.markAsVespaTenant();
domainMock.admin(AthenzUser.fromUserId(userId.id()));
mock.getSetup().addDomain(domainMock);
}
Aggregations