Skip to content

Commit

Permalink
fix healthcheck for pg
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Oct 24, 2024
1 parent 720142c commit 7ea0e2a
Show file tree
Hide file tree
Showing 50 changed files with 6 additions and 5 deletions.
Empty file removed library/2.0.0/tests/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion library/2.0.0/deps.py → library/2.0.1/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def perform_action(action):
print("Permissions are correct. Skipping...")
print(f"Time taken: {(time.time() - start_time) * 1000:.2f}ms")
print(f"=== Finished applying configuration on volume with identifier [{action['identifier']}] ===")
print(f"=== Finished applying configuration on volume with identifier [{action['identifier']}] ==")
print()
if __name__ == "__main__":
start_time = time.time()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def postgres_test(config: dict) -> str:
port = get_key(config, "port", 5432, False)
host = get_key(config, "host", "127.0.0.1", False)

return f"pg_isready -h {host} -p {port} -U $POSTGRES_USERNAME -d $POSTGRES_DATABASE"
return f"pg_isready -h {host} -p {port} -U $POSTGRES_USER -d $POSTGRES_DB"


def mariadb_test(config: dict) -> str:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_add_postgres(mock_values):
assert output["services"]["pg_container"]["deploy"]["resources"]["limits"]["cpus"] == "2.0"
assert output["services"]["pg_container"]["deploy"]["resources"]["limits"]["memory"] == "4096M"
assert output["services"]["pg_container"]["healthcheck"] == {
"test": "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USERNAME -d $$POSTGRES_DATABASE",
"test": "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB",
"interval": "10s",
"timeout": "5s",
"retries": 30,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_postgres_healthcheck(mock_values):
output = render.render()
assert (
output["services"]["test_container"]["healthcheck"]["test"]
== "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USERNAME -d $$POSTGRES_DATABASE"
== "pg_isready -h 127.0.0.1 -p 5432 -U $$POSTGRES_USER -d $$POSTGRES_DB"
)


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion library/hashes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
0.0.1: f074617a82a86d2a6cc78a4c8a4296fc9d168e456f12713e50c696557b302133
1.1.4: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113
2.0.0: 1d4f6760d7abd712271ff40ae0cabe3285f34a1f84c6922709d51f1f0bf5ce33
2.0.1: 77e44b15832ac747aadc0d04c3eaac54cd0a9810cf761670b0215cb9c6aa7608

0 comments on commit 7ea0e2a

Please sign in to comment.