diff --git a/.github/workflows/_integration.yml b/.github/workflows/_integration.yml index 0572978..115f606 100644 --- a/.github/workflows/_integration.yml +++ b/.github/workflows/_integration.yml @@ -1,4 +1,5 @@ name: Test the Terraform product module +run-name: Deploy ${{ inputs.product }} on ${{ inputs.runner }} on: workflow_dispatch: diff --git a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py index 931fb5e..b81fc5b 100644 --- a/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py +++ b/tests/integration/cos/tls_external/test_upgrade_cos_tls_external.py @@ -11,6 +11,7 @@ catalogue_apps_are_reachable, get_tls_context, refresh_o11y_apps, + no_errors_in_otelcol_logs, wait_for_active_idle_without_error, ) @@ -57,3 +58,4 @@ def test_deploy_to_track( wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) + no_errors_in_otelcol_logs(cos_model) diff --git a/tests/integration/cos/tls_external/track-2.tf b/tests/integration/cos/tls_external/track-2.tf index 9766172..8a6c33f 100644 --- a/tests/integration/cos/tls_external/track-2.tf +++ b/tests/integration/cos/tls_external/track-2.tf @@ -16,6 +16,7 @@ variable "ca_model" { type = string } + data "juju_model" "ca-model" { name = var.ca_model owner = "admin" diff --git a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py index 7ffb87e..aedb2ae 100644 --- a/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py +++ b/tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py @@ -10,6 +10,7 @@ from helpers import ( catalogue_apps_are_reachable, get_tls_context, + no_errors_in_otelcol_logs, refresh_o11y_apps, wait_for_active_idle_without_error, ) @@ -57,3 +58,4 @@ def test_deploy_to_track( wait_for_active_idle_without_error([ca_model, cos_model]) tls_ctx = get_tls_context(tmp_path, ca_model, "self-signed-certificates") catalogue_apps_are_reachable(cos_model, tls_ctx) + no_errors_in_otelcol_logs(cos_model) diff --git a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py index d08e745..1f163d4 100644 --- a/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py +++ b/tests/integration/cos/tls_internal/test_upgrade_cos_tls_internal.py @@ -9,6 +9,7 @@ from helpers import ( catalogue_apps_are_reachable, + no_errors_in_otelcol_logs, refresh_o11y_apps, wait_for_active_idle_without_error, ) @@ -50,3 +51,4 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) + no_errors_in_otelcol_logs(cos_model) diff --git a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py index 419dfaf..269a39d 100644 --- a/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py +++ b/tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py @@ -9,6 +9,7 @@ from helpers import ( catalogue_apps_are_reachable, + no_errors_in_otelcol_logs, refresh_o11y_apps, wait_for_active_idle_without_error, ) @@ -50,3 +51,4 @@ def test_deploy_to_track(tmp_path, tf_manager, cos_model: jubilant.Juju): # THEN the model is upgraded and is healthy wait_for_active_idle_without_error([cos_model]) catalogue_apps_are_reachable(cos_model) + no_errors_in_otelcol_logs(cos_model) diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 84f5a6e..25af5a2 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -9,6 +9,7 @@ from urllib.request import urlopen import jubilant +import pytest class TfDirManager: @@ -99,3 +100,17 @@ def catalogue_apps_are_reachable( continue response = urlopen(url, data=None, timeout=2.0, context=tls_context) assert response.code == 200, f"{app} was not reachable" + + +@pytest.mark.skip( + reason="""Waiting for the following issues to be resolved: +- https://github.com/canonical/cos-coordinated-workers/issues/123 +- https://github.com/canonical/tempo-operators/issues/254 +- https://github.com/canonical/cos-coordinated-workers/issues/115 +""" +) +def no_errors_in_otelcol_logs(juju: jubilant.Juju): + # By default, no debug exporters have been configured and otelcol logs at the WARN level + # Thus, there should be no logs outputted if otelcol is operating correctly + stdout = juju.ssh("otelcol/0", "pebble logs", container="otelcol") + assert not stdout