Add override for code generator to change indices.put_alias argument order (#804)

* Add currently-failing test to validate the original argument order

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

* Add workaround for breaking API change inadvertently added in v2.7.0

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

* Generate new version of the client code with the correct argument order

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

---------

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>
This commit is contained in:
Jeppe Fihl-Pearson
2024-08-22 08:33:55 -04:00
committed by GitHub
parent b994dc4063
commit e26f3fc28c
7 changed files with 147 additions and 115 deletions
@@ -45,3 +45,8 @@ class TestIndices(OpenSearchTestCase):
self.assertRaises(ValueError, self.client.indices.exists, index=None)
self.assertRaises(ValueError, self.client.indices.exists, index=[])
self.assertRaises(ValueError, self.client.indices.exists, index="")
def test_create_alias(self) -> None:
self.client.indices.create("test-index")
self.client.indices.put_alias("test-index", "test-alias")
self.assert_url_called("PUT", "/test-index/_alias/test-alias")