@@ -2790,16 +2790,16 @@ protected void assertEmptyProject(String projectId) throws IOException {
2790
2790
if (indexTemplates != null ) {
2791
2791
var templateNames = indexTemplates .keySet ().stream ().filter (name -> isXPackTemplate (name ) == false ).toList ();
2792
2792
assertThat ("Project [" + projectId + "] should not have index templates" , templateNames , empty ());
2793
- } else if ( projectId . equals ( Metadata . DEFAULT_PROJECT_ID . id ())) {
2794
- fail ("Expected default project to have standard templates, but was null" );
2793
+ } else {
2794
+ fail ("Expected project [" + projectId + "] to have standard templates, but was null" );
2795
2795
}
2796
2796
2797
2797
final Map <String , Object > componentTemplates = state .evaluate ("metadata.component_template.component_template" );
2798
2798
if (componentTemplates != null ) {
2799
2799
var templateNames = componentTemplates .keySet ().stream ().filter (name -> isXPackTemplate (name ) == false ).toList ();
2800
2800
assertThat ("Project [" + projectId + "] should not have component templates" , templateNames , empty ());
2801
- } else if ( projectId . equals ( Metadata . DEFAULT_PROJECT_ID . id ())) {
2802
- fail ("Expected default project to have standard component templates, but was null" );
2801
+ } else {
2802
+ fail ("Expected project [" + projectId + "] to have standard component templates, but was null" );
2803
2803
}
2804
2804
2805
2805
final List <Map <String , ?>> pipelines = state .evaluate ("metadata.ingest.pipeline" );
@@ -2809,8 +2809,8 @@ protected void assertEmptyProject(String projectId) throws IOException {
2809
2809
.filter (id -> isXPackIngestPipeline (id ) == false )
2810
2810
.toList ();
2811
2811
assertThat ("Project [" + projectId + "] should not have ingest pipelines" , pipelineNames , empty ());
2812
- } else if ( projectId . equals ( Metadata . DEFAULT_PROJECT_ID . id ())) {
2813
- fail ("Expected default project to have standard ingest pipelines, but was null" );
2812
+ } else {
2813
+ fail ("Expected project [" + projectId + "] to have standard ingest pipelines, but was null" );
2814
2814
}
2815
2815
2816
2816
if (has (ProductFeature .ILM )) {
@@ -2819,8 +2819,8 @@ protected void assertEmptyProject(String projectId) throws IOException {
2819
2819
var policyNames = new HashSet <>(ilmPolicies .keySet ());
2820
2820
policyNames .removeAll (preserveILMPolicyIds ());
2821
2821
assertThat ("Project [" + projectId + "] should not have ILM Policies" , policyNames , empty ());
2822
- } else if ( projectId . equals ( Metadata . DEFAULT_PROJECT_ID . id ())) {
2823
- fail ("Expected default project to have standard ILM policies, but was null" );
2822
+ } else {
2823
+ fail ("Expected project [" + projectId + "] to have standard ILM policies, but was null" );
2824
2824
}
2825
2825
}
2826
2826
}
0 commit comments