Skip to content

Commit

Permalink
Fixes for failing TestTokenQueries print assertions
Browse files Browse the repository at this point in the history
Assertion Error this time in another CI GitHub actions
Workflow name : test-with-docker

Succeeded earlier when the other test (ubuntu-only-test-with-manual-install) failed:
https://github.com/e-mission/e-mission-server/actions/runs/8658279606/job/23741854476

- This happened since then “storage not configured” wasn’t being printed, which is what the test wants as docker compose is used to set up mongo db container.
- With docker, localhost becomes db as the DB_HOST ENV var or “url” key-value.

SOLVED
- Added if condition to print “storage not configured” only when url value is till equal to sample value “localhost”
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Apr 12, 2024
1 parent e8344e9 commit 7f0d5f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion emission/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def get_config_data():
# Check if all DB environment variables are not set
# if check_unset_env_vars():
# print("All DB environment variables are set to None")
print("storage not configured, falling back to sample, default configuration")
ret_val = get_config_data_from_env()
if ret_val["url"] == "localhost":
print("storage not configured, falling back to sample, default configuration")
return ret_val

config_data = get_config_data()
Expand Down

0 comments on commit 7f0d5f0

Please sign in to comment.