From 20d6b26236c97682d7b03460a4ce17fb4ac2d330 Mon Sep 17 00:00:00 2001 From: TheByronHimes Date: Mon, 28 Oct 2024 15:19:17 +0000 Subject: [PATCH] Update config to use sms instead of ekss --- .devcontainer/.dev_config.yaml | 2 +- README.md | 5 +++++ config_schema.json | 1 + example_config.yaml | 2 +- src/sms/config.py | 3 ++- tests/fixtures/test_config.yaml | 2 +- tests/fixtures/vault.py | 2 +- 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.devcontainer/.dev_config.yaml b/.devcontainer/.dev_config.yaml index ea1a7a1..be7f2a3 100644 --- a/.devcontainer/.dev_config.yaml +++ b/.devcontainer/.dev_config.yaml @@ -4,7 +4,7 @@ token_hashes: - 7ad83b6b9183c91674eec897935bc154ba9ff9704f8be0840e77f476b5062b6e vault_token: "dev-token" vault_url: "http://vault:8200" -vault_path: "ekss" +vault_path: sms db_connection_str: mongodb://mongodb:27017 db_prefix: "test_" db_permissions: diff --git a/README.md b/README.md index 9d045f8..15c6b74 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,11 @@ The service requires the following configuration parameters: Examples: + ```json + "sms" + ``` + + ```json "ekss" ``` diff --git a/config_schema.json b/config_schema.json index 0f40b75..093cbd2 100644 --- a/config_schema.json +++ b/config_schema.json @@ -207,6 +207,7 @@ "vault_path": { "description": "Path for the Vault", "examples": [ + "sms", "ekss" ], "title": "Vault Path", diff --git a/example_config.yaml b/example_config.yaml index 02d8bb5..a405819 100644 --- a/example_config.yaml +++ b/example_config.yaml @@ -46,7 +46,7 @@ service_instance_id: '1' service_name: sms token_hashes: - 7ad83b6b9183c91674eec897935bc154ba9ff9704f8be0840e77f476b5062b6e -vault_path: ekss +vault_path: sms vault_token: dev-token vault_url: http://vault:8200 workers: 1 diff --git a/src/sms/config.py b/src/sms/config.py index 5eceb40..a1aefd3 100644 --- a/src/sms/config.py +++ b/src/sms/config.py @@ -24,7 +24,8 @@ from hexkit.log import LoggingConfig from hexkit.providers.akafka import KafkaConfig from pydantic import Field, SecretStr, field_validator, model_validator -from tests.fixtures.vault import VaultConfig + +from sms.core.secrets_handler import VaultConfig SERVICE_NAME: str = "sms" diff --git a/tests/fixtures/test_config.yaml b/tests/fixtures/test_config.yaml index 80d9d15..20d056b 100644 --- a/tests/fixtures/test_config.yaml +++ b/tests/fixtures/test_config.yaml @@ -4,7 +4,7 @@ token_hashes: - 7ad83b6b9183c91674eec897935bc154ba9ff9704f8be0840e77f476b5062b6e vault_token: "dev-token" vault_url: "http://vault:8200" -vault_path: "ekss" +vault_path: sms db_connection_str: mongodb://mongodb:27017 db_prefix: "test_" db_permissions: diff --git a/tests/fixtures/vault.py b/tests/fixtures/vault.py index 8fe382a..218a5e3 100644 --- a/tests/fixtures/vault.py +++ b/tests/fixtures/vault.py @@ -84,7 +84,7 @@ def vault_container_fixture() -> Generator[VaultContainerFixture, None, None]: port = vault_container.get_exposed_port(DEFAULT_PORT) vault_container.config = VaultConfig( vault_url=f"http://{host}:{port}", - vault_path="ekss", + vault_path="sms", vault_token=DEFAULT_TOKEN, )