@Override
    public void validate(Context context) {
        if (! context.deployState().isHosted()) return;
        if (context.model().getAdmin().getApplicationType() != ApplicationType.DEFAULT) return;

        for (ContainerCluster<?> cluster : context.model().getContainerClusters().values()) {
            if (cluster.getSecretStore().isPresent() && ! hasIdentityProvider(cluster))
                    context.illegal(String.format(
                            "Container cluster '%s' uses a secret store, so an Athenz domain and an Athenz service" +
                            " must be declared in deployment.xml.", cluster.getName()));
        }
    }
@Test
    void app_without_secret_store_passes_validation_without_athenz_in_deployment() throws Exception {
        String servicesXml = joinLines("<services version='1.0'>",
                "  <container id='default' version='1.0' />",
                "</services>");
        DeployState deployState = deployState(servicesXml, deploymentXml(false));
        VespaModel model = new VespaModel(new NullConfigModelRegistry(), deployState);

        ValidationTester.validate(new SecretStoreValidator(), model, deployState);
    }