Skip to content

Commit

Permalink
Use Docker Compose version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner authored and renovate[bot] committed Aug 6, 2024
1 parent 7b41505 commit f75d4b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion acceptance_tests/out/tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_logs_request_id(app2_connection, composition):
app2_connection.get_json("ping", headers={"X-Request-ID": "42 is the answer"})
logs = composition.dc(["logs", "app2"]).split("\n")
print("Got logs: " + repr(logs))
logs = [l for l in logs if re.search(r"\|.{4} \{", l)]
logs = [l for l in logs if re.search(r"\| \{", l)]
logs = [json.loads(l[l.index("{") :]) for l in logs]
logs = [l for l in logs if l["logger_name"] == "c2cwsgiutils_app.services.ping"]
assert logs[-1]["request_id"] == "42 is the answer"
9 changes: 6 additions & 3 deletions acceptance_tests/out/tests/test_stats_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,16 @@ def test_standalone(prometheus_stats_db_connection, composition):
"""
# To be able to debug
composition.dc_process(["logs", "stats_db"])
ps = [l for l in composition.dc(["ps"]).split("\n") if "c2cwsgiutils_stats_db_" in l]
ps = [l for l in composition.dc(["ps"]).split("\n")]
print("\n".join(ps))
ps = [l for l in ps if "c2cwsgiutils-stats_db-" in l]
assert len(ps) == 1
assert " Up " in ps[0]
print("Call Prometheus URL")
prometheus_stats_db_connection.session.get(prometheus_stats_db_connection.base_url)
ps = [l for l in composition.dc(["ps"]).split("\n") if "c2cwsgiutils_stats_db_" in l]
ps = [l for l in composition.dc(["ps"]).split("\n")]
print("\n".join(ps))
ps = [l for l in ps if "c2cwsgiutils-stats_db-" in l]
assert len(ps) == 1
assert ps[0].strip().endswith(" Exit 0")
# TODO: verify that the container exited correctly
# assert ps[0].strip().endswith(" Exit 0")

0 comments on commit f75d4b3

Please sign in to comment.