-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worked fine in Docker. Not so much from pip
- Loading branch information
Showing
21 changed files
with
637 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"""Curator Version""" | ||
__version__ = '8.0.2' | ||
__version__ = '8.0.2.post1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
"""Unit tests for create_index action""" | ||
from unittest import TestCase | ||
from mock import Mock | ||
import curator | ||
from curator.actions import CreateIndex | ||
from curator.exceptions import ConfigurationError, FailedExecution | ||
# Get test variables and constants from a single source | ||
from . import testvars | ||
|
||
class TestActionCreate_index(TestCase): | ||
def test_init_raise(self): | ||
self.assertRaises(TypeError, curator.CreateIndex, name='name') | ||
self.assertRaises(TypeError, CreateIndex, name='name') | ||
def test_init_raise_no_name(self): | ||
client = Mock() | ||
self.assertRaises(curator.ConfigurationError, | ||
curator.CreateIndex, client, name=None) | ||
self.assertRaises(ConfigurationError, | ||
CreateIndex, client, name=None) | ||
def test_init(self): | ||
client = Mock() | ||
co = curator.CreateIndex(client, name='name') | ||
co = CreateIndex(client, name='name') | ||
self.assertEqual('name', co.name) | ||
self.assertEqual(client, co.client) | ||
def test_do_dry_run(self): | ||
client = Mock() | ||
co = curator.CreateIndex(client, name='name') | ||
co = CreateIndex(client, name='name') | ||
self.assertIsNone(co.do_dry_run()) | ||
def test_do_action(self): | ||
client = Mock() | ||
client.indices.create.return_value = None | ||
co = curator.CreateIndex(client, name='name') | ||
co = CreateIndex(client, name='name') | ||
self.assertIsNone(co.do_action()) | ||
def test_do_action_raises_exception(self): | ||
client = Mock() | ||
client.indices.create.return_value = None | ||
client.indices.create.side_effect = testvars.fake_fail | ||
co = curator.CreateIndex(client, name='name') | ||
self.assertRaises(curator.FailedExecution, co.do_action) | ||
co = CreateIndex(client, name='name') | ||
self.assertRaises(FailedExecution, co.do_action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.