diff --git a/src/otaclient_iot_logging_server/configs.py b/src/otaclient_iot_logging_server/configs.py index 1ca00bb..6a0a486 100644 --- a/src/otaclient_iot_logging_server/configs.py +++ b/src/otaclient_iot_logging_server/configs.py @@ -34,7 +34,7 @@ class ConfigurableLoggingServerConfig(BaseSettings): GREENGRASS_V1_CONFIG: str = "/greengrass/config/config.json" GREENGRASS_V2_CONFIG: str = "/greengrass/v2/init_config/config.yaml" - AWS_PROFILE_INFO: str = "/opt/ota/iot_logger/aws_profile_info.yaml" + AWS_PROFILE_INFO: str = "/opt/ota/iot-logger/aws_profile_info.yaml" """The path to aws_profile_info.yaml.""" LISTEN_ADDRESS: str = "127.0.0.1" diff --git a/tests/test_aws_iot_logger.py b/tests/test_aws_iot_logger.py index 29dfc47..b3f0957 100644 --- a/tests/test_aws_iot_logger.py +++ b/tests/test_aws_iot_logger.py @@ -135,8 +135,11 @@ def setup_test(self, prepare_test_data, mocker: MockerFixture): get_log_stream_name_mock = mocker.MagicMock(wraps=lambda x, y: y) mocker.patch(f"{MODULE}.get_log_stream_name", get_log_stream_name_mock) - def test_thread_main(self): + def test_thread_main(self, mocker: MockerFixture): func_to_test = AWSIoTLogger.thread_main + self._create_log_group = mocked__create_log_group = mocker.MagicMock( + spec=AWSIoTLogger._create_log_group + ) # ------ execution ------ # with pytest.raises(self._TestFinished): @@ -144,5 +147,6 @@ def test_thread_main(self): logger.info("execution finished") # ------ check result ------ # + mocked__create_log_group.assert_called_once() # confirm the send_messages mock receives the expecting calls. assert self._merged_msgs == self._test_result diff --git a/tests/test_configs.py b/tests/test_configs.py index 9d12f29..dec1a43 100644 --- a/tests/test_configs.py +++ b/tests/test_configs.py @@ -40,7 +40,7 @@ { "GREENGRASS_V1_CONFIG": "/greengrass/config/config.json", "GREENGRASS_V2_CONFIG": "/greengrass/v2/init_config/config.yaml", - "AWS_PROFILE_INFO": "/opt/ota/iot_logger/aws_profile_info.yaml", + "AWS_PROFILE_INFO": "/opt/ota/iot-logger/aws_profile_info.yaml", "LISTEN_ADDRESS": "127.0.0.1", "LISTEN_PORT": 8083, "UPLOAD_LOGGING_SERVER_LOGS": False, @@ -64,7 +64,7 @@ { "GREENGRASS_V1_CONFIG": "/greengrass/config/config.json", "GREENGRASS_V2_CONFIG": "/greengrass/v2/init_config/config.yaml", - "AWS_PROFILE_INFO": "/opt/ota/iot_logger/aws_profile_info.yaml", + "AWS_PROFILE_INFO": "/opt/ota/iot-logger/aws_profile_info.yaml", "LISTEN_ADDRESS": "172.16.1.1", "LISTEN_PORT": 8083, "UPLOAD_LOGGING_SERVER_LOGS": False,