server/src/test/java/org/elasticsearch/health/node/DiskHealthIndicatorServiceTests.java
assertThat(details.get("unknown_nodes"), equalTo(0));
            assertThat(details.get("yellow_nodes"), equalTo(allNodes.size()));
            assertThat(details.get("red_nodes"), equalTo(0));
            assertThat(details.get("blocked_indices"), equalTo(0));
        }
    }
    /*
     * Simulates a cluster with nodes with all roles that report RED status, the nodes have indices but and there are
     * no blocks in the cluster state. This situation can occur when the health monitor has identified that nodes are running out
     * of space but the DiskThresholdMonitor hasn't yet.
     * We expect 3 impacts and 1 diagnosis.
     */
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/90305")
    public void testRedNoBlockedIndicesAndRedAllRoleNodes() throws IOException {
        Set<DiscoveryNode> discoveryNodes = createNodesWithAllRoles();
        int affectedNodes = randomIntBetween(discoveryNodes.size() / 2 + 1, discoveryNodes.size());
        Map<String, Set<String>> indexNameToNodeIdsMap = new HashMap<>();
        Set<String> nodeIds = discoveryNodes.stream().map(DiscoveryNode::getId).collect(Collectors.toSet());
        for (int i = 0; i < randomIntBetween(1, 20); i++) {
            String indexName = randomAlphaOfLength(20);
            indexNameToNodeIdsMap.put(indexName, new HashSet<>(randomNonEmptySubsetOf(nodeIds)));
        }
        ClusterService clusterService = createClusterService(Set.of(), discoveryNodes, indexNameToNodeIdsMap);
        DiskHealthIndicatorService diskHealthIndicatorService = new DiskHealthIndicatorService(clusterService);
        HealthStatus expectedStatus = HealthStatus.RED;
        HealthInfo healthInfo = createHealthInfo(new HealthInfoConfig(expectedStatus, affectedNodes, discoveryNodes));
        HealthIndicatorResult result = diskHealthIndicatorService.calculate(true, healthInfo);
        assertThat(result.status(), equalTo(expectedStatus));
        assertThat(result.symptom(), containsString(affectedNodes + " node" + (affectedNodes == 1 ? "" : "s") + " with roles: [data"));
        assertThat(result.symptom(), containsString(" out of disk or running low on disk space."));