Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/_integration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test the Terraform product module
run-name: Deploy ${{ inputs.product }} on ${{ inputs.runner }}

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions tests/integration/cos/tls_external/track-2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ variable "ca_model" {
type = string
}


data "juju_model" "ca-model" {
name = var.ca_model
owner = "admin"
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/cos/tls_full/test_upgrade_cos_tls_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions tests/integration/cos/tls_none/test_upgrade_cos_tls_none.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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)
15 changes: 15 additions & 0 deletions tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from urllib.request import urlopen

import jubilant
import pytest


class TfDirManager:
Expand Down Expand Up @@ -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
Loading