diff --git a/docker/types/containers.py b/docker/types/containers.py index 598188a2..7eb2c9ce 100644 --- a/docker/types/containers.py +++ b/docker/types/containers.py @@ -23,9 +23,12 @@ class LogConfigTypesEnum: 'journald', 'gelf', 'fluentd', + 'awslogs', + 'splunk', + 'etwlogs', 'none' ) - JSON, SYSLOG, JOURNALD, GELF, FLUENTD, NONE = _values + JSON, SYSLOG, JOURNALD, GELF, FLUENTD, AWS, SPLUNK, ETW, NONE = _values class LogConfig(DictType): diff --git a/tests/unit/dockertypes_test.py b/tests/unit/dockertypes_test.py index 03e7d2ed..b28c45d9 100644 --- a/tests/unit/dockertypes_test.py +++ b/tests/unit/dockertypes_test.py @@ -269,9 +269,13 @@ class UlimitTest(unittest.TestCase): Ulimit(name='hello', hard='456') -class LogConfigTest(unittest.TestCase): - def test_create_host_config_dict_logconfig(self): - dct = {'type': LogConfig.types.SYSLOG, 'config': {'key1': 'val1'}} +@pytest.mark.parametrize( + "log_config_type", + [LogConfig.types.SYSLOG, LogConfig.types.AWS] +) +class LogConfigTest: + def test_create_host_config_dict_logconfig(self, log_config_type): + dct = {'type': log_config_type, 'config': {'key1': 'val1'}} config = create_host_config( version=DEFAULT_DOCKER_API_VERSION, log_config=dct ) @@ -279,8 +283,8 @@ class LogConfigTest(unittest.TestCase): assert isinstance(config['LogConfig'], LogConfig) assert dct['type'] == config['LogConfig'].type - def test_create_host_config_obj_logconfig(self): - obj = LogConfig(type=LogConfig.types.SYSLOG, config={'key1': 'val1'}) + def test_create_host_config_obj_logconfig(self, log_config_type): + obj = LogConfig(type=log_config_type, config={'key1': 'val1'}) config = create_host_config( version=DEFAULT_DOCKER_API_VERSION, log_config=obj )