Skip to content

Commit

Permalink
Rename values of FailureStoreOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbauman committed Apr 3, 2024
1 parent 755226d commit feeb3dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void testGetIndexApi() throws IOException {
assertThat(indices.containsKey(backingIndex), is(true));
}
{
final Response indicesResponse = client().performRequest(new Request("GET", "/" + DATA_STREAM_NAME + "?failure_store=only"));
final Response indicesResponse = client().performRequest(new Request("GET", "/" + DATA_STREAM_NAME + "?failure_store=true"));
Map<String, Object> indices = entityAsMap(indicesResponse);
assertThat(indices.size(), is(1));
assertThat(indices.containsKey(failureStoreIndex), is(true));
Expand All @@ -98,7 +98,7 @@ public void testGetIndexStatsApi() throws IOException {
}
{
final Response statsResponse = client().performRequest(
new Request("GET", "/" + DATA_STREAM_NAME + "/_stats?failure_store=true")
new Request("GET", "/" + DATA_STREAM_NAME + "/_stats?failure_store=include")
);
Map<String, Object> indices = (Map<String, Object>) entityAsMap(statsResponse).get("indices");
assertThat(indices.size(), is(2));
Expand All @@ -107,7 +107,7 @@ public void testGetIndexStatsApi() throws IOException {
}
{
final Response statsResponse = client().performRequest(
new Request("GET", "/" + DATA_STREAM_NAME + "/_stats?failure_store=only")
new Request("GET", "/" + DATA_STREAM_NAME + "/_stats?failure_store=true")
);
Map<String, Object> indices = (Map<String, Object>) entityAsMap(statsResponse).get("indices");
assertThat(indices.size(), is(1));
Expand All @@ -124,7 +124,7 @@ public void testGetIndexSettingsApi() throws IOException {
}
{
final Response indicesResponse = client().performRequest(
new Request("GET", "/" + DATA_STREAM_NAME + "/_settings?failure_store=true")
new Request("GET", "/" + DATA_STREAM_NAME + "/_settings?failure_store=include")
);
Map<String, Object> indices = entityAsMap(indicesResponse);
assertThat(indices.size(), is(2));
Expand All @@ -133,7 +133,7 @@ public void testGetIndexSettingsApi() throws IOException {
}
{
final Response indicesResponse = client().performRequest(
new Request("GET", "/" + DATA_STREAM_NAME + "/_settings?failure_store=only")
new Request("GET", "/" + DATA_STREAM_NAME + "/_settings?failure_store=true")
);
Map<String, Object> indices = entityAsMap(indicesResponse);
assertThat(indices.size(), is(1));
Expand All @@ -150,7 +150,7 @@ public void testGetIndexMappingApi() throws IOException {
}
{
final Response indicesResponse = client().performRequest(
new Request("GET", "/" + DATA_STREAM_NAME + "/_mapping?failure_store=true")
new Request("GET", "/" + DATA_STREAM_NAME + "/_mapping?failure_store=include")
);
Map<String, Object> indices = entityAsMap(indicesResponse);
assertThat(indices.size(), is(2));
Expand All @@ -159,7 +159,7 @@ public void testGetIndexMappingApi() throws IOException {
}
{
final Response indicesResponse = client().performRequest(
new Request("GET", "/" + DATA_STREAM_NAME + "/_mapping?failure_store=only")
new Request("GET", "/" + DATA_STREAM_NAME + "/_mapping?failure_store=true")
);
Map<String, Object> indices = entityAsMap(indicesResponse);
assertThat(indices.size(), is(1));
Expand All @@ -183,7 +183,7 @@ public void testPutIndexMappingApi() throws IOException {
assertAcknowledged(client().performRequest(mappingRequest));
}
{
final Request mappingRequest = new Request("PUT", "/" + DATA_STREAM_NAME + "/_mapping?failure_store=true");
final Request mappingRequest = new Request("PUT", "/" + DATA_STREAM_NAME + "/_mapping?failure_store=include");
mappingRequest.setJsonEntity("""
{
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ public record FailureStoreOptions(boolean includeRegularIndices, boolean include
ToXContentFragment {

public static final String FAILURE_STORE = "failure_store";
public static final String INCLUDE_ALL = "true";
public static final String INCLUDE_ALL = "include";
public static final String INCLUDE_ONLY_REGULAR_INDICES = "false";
public static final String INCLUDE_ONLY_FAILURE_INDICES = "only";
public static final String INCLUDE_ONLY_FAILURE_INDICES = "true";

public static final FailureStoreOptions DEFAULT = new FailureStoreOptions(true, false);

Expand Down

0 comments on commit feeb3dd

Please sign in to comment.