Skip to content

Commit

Permalink
feat: Implement handling of TEST environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fedmog1lnkv committed Sep 4, 2023
1 parent 7b31024 commit c455151
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions user_service/src/config/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@

DICT_ENVS["TEST"] = env.bool("TEST")

if not env.bool("TEST"):
DICT_ENVS["LOGSTASH_HOST"] = env.str("LOGSTASH_HOST")
DICT_ENVS["LOGSTASH_PORT"] = env.int("LOGSTASH_PORT")

DICT_ENVS["CONSUL_HOST"] = env.str("CONSUL_HOST", None)
DICT_ENVS["CONSUL_PORT"] = env.int("CONSUL_PORT", None)
DICT_ENVS["CONSUL_TOKEN"] = env.str("CONSUL_TOKEN", None)

DICT_ENVS["GATEWAY_TIMEOUT"] = env.int("GATEWAY_TIMEOUT", 59)

DICT_ENVS["FASTAPI_IP"] = env.str("FASTAPI_IP")
DICT_ENVS["FASTAPI_PORT"] = env.int("FASTAPI_PORT")

DICT_ENVS["LOGSTASH_HOST"] = env.str("LOGSTASH_HOST")
DICT_ENVS["LOGSTASH_PORT"] = env.int("LOGSTASH_PORT")

DICT_ENVS["CONSUL_HOST"] = env.str("CONSUL_HOST", None)
DICT_ENVS["CONSUL_PORT"] = env.int("CONSUL_PORT", None)
DICT_ENVS["CONSUL_TOKEN"] = env.str("CONSUL_TOKEN", None)

DICT_ENVS["POSTGRES_HOST"] = env.str("POSTGRES_HOST")
DICT_ENVS["POSTGRES_PORT"] = env.int("POSTGRES_PORT")
DICT_ENVS["POSTGRES_DB"] = env.str("POSTGRES_DB")
Expand Down

0 comments on commit c455151

Please sign in to comment.