Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concierge-ck8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See LICENSE file for licensing details.

juju:
channel: 3/stable
channel: 4.1/edge
model-defaults:
test-mode: "true"
automatically-retry-hooks: "false"
Expand Down
2 changes: 1 addition & 1 deletion concierge-lxd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See LICENSE file for licensing details.

juju:
channel: 3/stable
channel: 4.1/edge
model-defaults:
test-mode: "true"
automatically-retry-hooks: "false"
Expand Down
1 change: 0 additions & 1 deletion haproxy-ddos-protection-configurator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ integration = [
"httpx[http2]==0.28.1",
"jinja2==3.1.6",
"jubilant==1.11.0",
"juju==3.6.1.3",
"opcli @ git+https://github.com/canonical/charm-ci.git@v0.0.1-alpha.10",
"protobuf==6.33.6",
"pytest",
Expand Down
493 changes: 0 additions & 493 deletions haproxy-ddos-protection-configurator/uv.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion haproxy-operator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ integration = [
"httpx[http2]==0.28.1",
"jinja2==3.1.6",
"jubilant==1.11.0",
"juju==3.6.1.3",
"opcli @ git+https://github.com/canonical/charm-ci.git@v0.0.1-alpha.10",
"protobuf==6.33.6",
"playwright==1.61.0",
Expand Down
5 changes: 4 additions & 1 deletion haproxy-operator/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def certificate_provider_application_fixture(
logger.warning("Using existing application: %s", SELF_SIGNED_CERTIFICATES_APP_NAME)
return SELF_SIGNED_CERTIFICATES_APP_NAME
juju.deploy(
"self-signed-certificates", app=SELF_SIGNED_CERTIFICATES_APP_NAME, channel="1/edge"
"self-signed-certificates",
app=SELF_SIGNED_CERTIFICATES_APP_NAME,
channel="1/edge",
force=True,
)
return SELF_SIGNED_CERTIFICATES_APP_NAME

Expand Down
6 changes: 3 additions & 3 deletions haproxy-operator/tests/integration/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ def get_http_version_from_apache2_logs(
Returns:
The extracted HTTP version string.
"""
last_httpx_log_entry = juju.ssh(
f"{app_name}/0",
last_httpx_log_entry = juju.exec(
f"grep '{request_id}' /var/log/apache2/access.log | tail -n 1",
)
unit=f"{app_name}/leader",
).stdout

match = pattern.search(last_httpx_log_entry)
if not match:
Expand Down
4 changes: 3 additions & 1 deletion haproxy-operator/tests/integration/legacy/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def test_get_certificate_action(
)
assert "-----BEGIN CERTIFICATE-----" in task.results.get("certificate", "")

stdout = juju.ssh(f"{configured_application_with_tls}/0", "ls /var/lib/haproxy/certs")
stdout = juju.exec(
"ls /var/lib/haproxy/certs", unit=f"{configured_application_with_tls}/0"
).stdout
assert f"{TEST_EXTERNAL_HOSTNAME_CONFIG}.pem" in stdout

# The action should fail when run without the required hostname parameter.
Expand Down
2 changes: 1 addition & 1 deletion haproxy-operator/tests/integration/legacy/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def test_config(application: str, juju: jubilant.Juju):
juju.config(application, {"global-maxconn": "1024"})
juju.wait(lambda status: jubilant.all_active(status, application))

stdout = juju.ssh(f"{application}/0", "cat /etc/haproxy/haproxy.cfg")
stdout = juju.exec("cat /etc/haproxy/haproxy.cfg", unit=f"{application}/0").stdout
assert "maxconn 1024" in stdout
2 changes: 1 addition & 1 deletion haproxy-operator/tests/integration/legacy/test_cos.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def test_metrics(application: str, juju: jubilant.Juju):
act: request haproxy metrics endpoint via SSH.
assert: confirm that metrics are available.
"""
stdout = juju.ssh(f"{application}/0", "curl -m 10 localhost:8404/metrics")
stdout = juju.exec("curl -m 10 localhost:8404/metrics", unit=f"{application}/0").stdout
assert "haproxy_backend_max_connect_time_seconds" in stdout
6 changes: 3 additions & 3 deletions haproxy-operator/tests/integration/test_haproxy_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def test_haproxy_route_any_charm_requirer(
status, configured_application_with_tls, any_charm_haproxy_route_requirer
)
)
haproxy_config = juju.ssh(
f"{configured_application_with_tls}/0", "cat /etc/haproxy/haproxy.cfg"
)
haproxy_config = juju.exec(
"cat /etc/haproxy/haproxy.cfg", unit=f"{configured_application_with_tls}/0"
).stdout
assert all(
entry in haproxy_config
for entry in [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def test_haproxy_route_https_with_different_transport_protocols(
)
)

juju.run(f"{any_charm_haproxy_route_requirer}/0", "rpc", {"method": "start_ssl_server"})
juju.run(f"{any_charm_haproxy_route_requirer}/leader", "rpc", {"method": "start_ssl_server"})

juju.run(
f"{any_charm_haproxy_route_requirer}/0",
f"{any_charm_haproxy_route_requirer}/leader",
"rpc",
{
"method": "update_relation",
Expand Down Expand Up @@ -125,7 +125,7 @@ def test_haproxy_route_https_with_different_transport_protocols(
)

# Test HTTP/2 with http/2 support on backend
juju.run(f"{any_charm_haproxy_route_requirer}/0", "rpc", {"method": "enable_http2"})
juju.run(f"{any_charm_haproxy_route_requirer}/leader", "rpc", {"method": "enable_http2"})

request_id = str(uuid.uuid4())
with httpx.Client(http2=True, verify=False) as client: # nosec: B501
Expand Down Expand Up @@ -153,9 +153,9 @@ def test_haproxy_route_https_with_different_transport_protocols(

# Test HTTP/1.1 without http/1.1 support on backend
juju.run(
f"{any_charm_haproxy_route_requirer}/0",
f"{any_charm_haproxy_route_requirer}/leader",
"rpc",
{"method": "start_ssl_server", "protocols": "h2"},
{"method": "start_ssl_server", "kwargs": json.dumps({"protocols": "h2"})},
)

request_id = str(uuid.uuid4())
Expand Down
24 changes: 12 additions & 12 deletions haproxy-operator/tests/integration/test_haproxy_route_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def test_haproxy_route_tcp(
)
)

haproxy_config = juju.ssh(
f"{configured_application_with_tls}/0", "cat /etc/haproxy/haproxy.cfg"
)
haproxy_config = juju.exec(
"cat /etc/haproxy/haproxy.cfg", unit=f"{configured_application_with_tls}/0"
).stdout
assert all(
entry in haproxy_config
for entry in [
Expand All @@ -86,9 +86,9 @@ def test_haproxy_route_tcp(
)
)

haproxy_config = juju.ssh(
f"{configured_application_with_tls}/0", "cat /etc/haproxy/haproxy.cfg"
)
haproxy_config = juju.exec(
"cat /etc/haproxy/haproxy.cfg", unit=f"{configured_application_with_tls}/0"
).stdout
assert all(
entry in haproxy_config
for entry in [
Expand All @@ -110,9 +110,9 @@ def test_haproxy_route_tcp(
)
)

haproxy_config = juju.ssh(
f"{configured_application_with_tls}/0", "cat /etc/haproxy/haproxy.cfg"
)
haproxy_config = juju.exec(
"cat /etc/haproxy/haproxy.cfg", unit=f"{configured_application_with_tls}/0"
).stdout
assert "send-proxy" in haproxy_config

# Test with port range binding
Expand All @@ -127,7 +127,7 @@ def test_haproxy_route_tcp(
)
)

haproxy_config = juju.ssh(
f"{configured_application_with_tls}/0", "cat /etc/haproxy/haproxy.cfg"
)
haproxy_config = juju.exec(
"cat /etc/haproxy/haproxy.cfg", unit=f"{configured_application_with_tls}/0"
).stdout
assert "bind [::]:8080-8090" in haproxy_config
Loading
Loading