Skip to content

Commit a4400f7

Browse files
committed
Move some methods
1 parent b1ed397 commit a4400f7

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

test/framework/src/main/java/org/elasticsearch/test/rest/ESRestTestCase.java

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -456,40 +456,6 @@ public void initClient() throws IOException {
456456
assert nodesVersions != null;
457457
}
458458

459-
private void configureProjects() throws IOException {
460-
if (projectsConfigured || multiProjectEnabled == false) {
461-
return;
462-
}
463-
projectsConfigured = true;
464-
createProject(activeProject);
465-
for (var project : extraProjects) {
466-
createProject(project);
467-
}
468-
469-
// The admin client does not set a project id, and can see all projects
470-
assertProjectIds(
471-
adminClient(),
472-
CollectionUtils.concatLists(List.of(Metadata.DEFAULT_PROJECT_ID.id(), activeProject), extraProjects)
473-
);
474-
// The test client can only see the project it targets
475-
assertProjectIds(client(), List.of(activeProject));
476-
}
477-
478-
@After
479-
public final void assertEmptyProjects() throws Exception {
480-
if (multiProjectEnabled == false) {
481-
return;
482-
}
483-
assertEmptyProject(Metadata.DEFAULT_PROJECT_ID.id());
484-
for (var project : extraProjects) {
485-
assertEmptyProject(project);
486-
}
487-
}
488-
489-
public static String activeProject() {
490-
return activeProject;
491-
}
492-
493459
protected final TestFeatureService createTestFeatureService(
494460
Map<String, Set<String>> clusterStateFeatures,
495461
Set<Version> semanticNodeVersions
@@ -2760,6 +2726,40 @@ protected static void assertResultMap(
27602726
assertMap(result, mapMatcher.entry("columns", columnMatcher).entry("values", valuesMatcher));
27612727
}
27622728

2729+
private void configureProjects() throws IOException {
2730+
if (projectsConfigured || multiProjectEnabled == false) {
2731+
return;
2732+
}
2733+
projectsConfigured = true;
2734+
createProject(activeProject);
2735+
for (var project : extraProjects) {
2736+
createProject(project);
2737+
}
2738+
2739+
// The admin client does not set a project id, and can see all projects
2740+
assertProjectIds(
2741+
adminClient(),
2742+
CollectionUtils.concatLists(List.of(Metadata.DEFAULT_PROJECT_ID.id(), activeProject), extraProjects)
2743+
);
2744+
// The test client can only see the project it targets
2745+
assertProjectIds(client(), List.of(activeProject));
2746+
}
2747+
2748+
@After
2749+
public final void assertEmptyProjects() throws Exception {
2750+
if (multiProjectEnabled == false) {
2751+
return;
2752+
}
2753+
assertEmptyProject(Metadata.DEFAULT_PROJECT_ID.id());
2754+
for (var project : extraProjects) {
2755+
assertEmptyProject(project);
2756+
}
2757+
}
2758+
2759+
public static String activeProject() {
2760+
return activeProject;
2761+
}
2762+
27632763
protected void createProject(String project) throws IOException {
27642764
assert multiProjectEnabled;
27652765
final Request request = new Request("PUT", "/_project/" + project);

0 commit comments

Comments
 (0)