Skip to content

Commit f805c7f

Browse files
nielsbaumanmridula-s109
authored andcommitted
Move project-related tests from MetadataTests to ProjectMetadataTests (elastic#130846)
The main goal was to get rid of loads of usages of deprecated methods in `Metadata` and its builder, but I figured it made more sense to move these tests to a more appropriate test class. These changes mainly consist of a copy-paste from one test class to another, and using `ProjectMetadata` objects (and its builders) instead of `Metadata` objects.
1 parent f5d6ea9 commit f805c7f

File tree

4 files changed

+2381
-2341
lines changed

4 files changed

+2381
-2341
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,12 +1499,6 @@ public Builder put(String name, ComponentTemplate componentTemplate) {
14991499
return this;
15001500
}
15011501

1502-
@Deprecated(forRemoval = true)
1503-
public Builder removeComponentTemplate(String name) {
1504-
getSingleProject().removeComponentTemplate(name);
1505-
return this;
1506-
}
1507-
15081502
@Deprecated(forRemoval = true)
15091503
public Builder componentTemplates(Map<String, ComponentTemplate> componentTemplates) {
15101504
getSingleProject().componentTemplates(componentTemplates);
@@ -1523,12 +1517,6 @@ public Builder put(String name, ComposableIndexTemplate indexTemplate) {
15231517
return this;
15241518
}
15251519

1526-
@Deprecated(forRemoval = true)
1527-
public Builder removeIndexTemplate(String name) {
1528-
getSingleProject().removeIndexTemplate(name);
1529-
return this;
1530-
}
1531-
15321520
@Deprecated(forRemoval = true)
15331521
public Builder dataStreams(Map<String, DataStream> dataStreams, Map<String, DataStreamAlias> dataStreamAliases) {
15341522
getSingleProject().dataStreams(dataStreams, dataStreamAliases);
@@ -1557,11 +1545,6 @@ public Builder removeDataStream(String name) {
15571545
return this;
15581546
}
15591547

1560-
@Deprecated(forRemoval = true)
1561-
public boolean removeDataStreamAlias(String aliasName, String dataStreamName, boolean mustExist) {
1562-
return getSingleProject().removeDataStreamAlias(aliasName, dataStreamName, mustExist);
1563-
}
1564-
15651548
public Builder putCustom(String type, ClusterCustom custom) {
15661549
customs.put(type, Objects.requireNonNull(custom, type));
15671550
return this;

0 commit comments

Comments
 (0)