Skip to content

Commit

Permalink
warning for skipped test in integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Golaszewski committed Aug 5, 2024
1 parent b552eae commit b44d75d
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions tests/integration/test_fluent_bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging

import pytest
import warnings
from k8s_test_harness import harness
from k8s_test_harness.util import env_util, k8s_util

Expand All @@ -16,21 +17,25 @@
def test_integration_fluent_bit(
function_instance: harness.Instance, image_version: str
):
fluent_bit_rock = env_util.get_build_meta_info_for_rock_version(
"fluent-bit", image_version, "amd64"
)

images = [k8s_util.HelmImage(fluent_bit_rock.image)]

helm_command = k8s_util.get_helm_install_command(
"fluent-bit",
"fluent-bit",
namespace="fluent-bit",
repository="https://fluent.github.io/helm-charts",
chart_version="0.34.2", # chart version with 2.1.6 app
images=images,
)

function_instance.exec(helm_command)

k8s_util.wait_for_daemonset(function_instance, "fluent-bit", "fluent-bit")
try:
fluent_bit_rock = env_util.get_build_meta_info_for_rock_version(
"fluent-bit", image_version, "amd64"
)
except ValueError:
warnings.warn(UserWarning(f"image version {image_version} not found"))

else:
images = [k8s_util.HelmImage(fluent_bit_rock.image)]

helm_command = k8s_util.get_helm_install_command(
"fluent-bit",
"fluent-bit",
namespace="fluent-bit",
repository="https://fluent.github.io/helm-charts",
chart_version="0.34.2", # chart version with 2.1.6 app
images=images,
)

function_instance.exec(helm_command)

k8s_util.wait_for_daemonset(function_instance, "fluent-bit", "fluent-bit")

0 comments on commit b44d75d

Please sign in to comment.