Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
FC-40616

Mailpit always expects a basic auth component, so we add one to the
deployment.

Alsio noticed that `env_name` isn't a namevar for `HTTPBasicAuth`, so
fixed up the docstring to reflect that.
  • Loading branch information
Ma27 committed Sep 3, 2024
1 parent d5bb153 commit 131dde3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/batou_ext/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HTTPBasicAuth(batou.component.Component):
from batou_ext.http import HTTPBasicAuth
self += batou_ext.http.HTTPBasicAuth(
"myauth",
env_name="myauth",
username="joe",
password="secret",
basic_auth_string="joe:$apr1$Ma0Fc6pW$Kl5dV4ecBXH12gDieRHVq.")
Expand Down
4 changes: 4 additions & 0 deletions src/batou_ext/tests/test_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,8 @@ def test_prepare(root, mocker, component, tmpdir):
instance.script = "/srv/s-myuser/start-application.sh"
instance.watchdog_script_path = "/srv/s-myuser/watchdog-wrapper.py"
instance.healthcheck_url = "https://example.com"
elif component_name == "batou_ext.mail.Mailpit":
batou_ext.http.HTTPBasicAuth(
**batou_ext.http.HTTPBasicAuth._required_params_
).prepare(root)
instance.prepare(root)

0 comments on commit 131dde3

Please sign in to comment.