Skip to content

Commit

Permalink
Merge branch 'main' into index-filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
chelma authored Jun 25, 2024
2 parents c44ee89 + 641bbe2 commit 4f8a074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ConnectionResult:

def cat_indices(cluster: Cluster, as_json=False):
as_json_suffix = "?format=json" if as_json else "?v"
cat_indices_path = f"/_cat/indices{as_json_suffix}"
cat_indices_path = f"/_cat/indices/_all{as_json_suffix}"
r = cluster.call_api(cat_indices_path)
return r.json() if as_json else r.content

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ def test_cli_snapshot_status(runner, env, mocker):

def test_cli_cat_indices_e2e(runner, env):
with requests_mock.Mocker() as rm:
rm.get(f"{env.source_cluster.endpoint}/_cat/indices",
rm.get(f"{env.source_cluster.endpoint}/_cat/indices/_all",
status_code=200,
text=source_cat_indices)
rm.get(f"{env.target_cluster.endpoint}/_cat/indices",
rm.get(f"{env.target_cluster.endpoint}/_cat/indices/_all",
status_code=200,
text=target_cat_indices)
result = runner.invoke(cli, ['--config-file', str(VALID_SERVICES_YAML), 'clusters', 'cat-indices'],
Expand Down

0 comments on commit 4f8a074

Please sign in to comment.