From 310e9c7e0dbad2f15721c9e7ec820fefb7b11da2 Mon Sep 17 00:00:00 2001 From: Slavo <133103846+svteb@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:52:09 +0200 Subject: [PATCH] Fix: Routed logs test now correctly checks if CNF is being tailed (#2034) * Fix: Routed logs test now correctly checks if CNF is being tailed Ref: #2025 #2016 - The issue explained in #2025 where fluent was tailing itself instead of the CNF has been resolved. - The dead helm repo mentioned in #2016 has been replace by link to bitnami repo, there was a similar occurence in the spec test. - The family of fluentd functions and files have been refactored into configurable files (allows for future additions/checking of elastic, aws fluent, etc.). - The routed_logs test was also modified to conform to the new functions (also shortened). - Other files have been edited for completion/conformance with naming conventions. Signed-off-by: svteb * Fix: Corrected a require command in observability_spec.cr Refs: #2025 Signed-off-by: svteb * Refactor: better abstraction of fluent flavors Refs: #2025 - Reworked the config dictionary into classes that inherit from a base abstract class. - Renamed FluentManagement module to FluentManager - Interfaces changed to adhere to the new abstraction Signed-off-by: svteb --------- Signed-off-by: svteb --- ...entbit-config.yml => fluentbit-values.yml} | 0 embedded_files/fluentd-bitnami-values.yml | 2 + spec/workload/observability_spec.cr | 16 +-- src/tasks/constants.cr | 1 + src/tasks/fluent_setup.cr | 34 ++++++ src/tasks/fluentbit_setup.cr | 14 --- src/tasks/fluentd_setup.cr | 14 --- src/tasks/fluentdbitnami_setup.cr | 14 --- src/tasks/utils/embedded_file_manager.cr | 5 +- src/tasks/utils/fluent_manager.cr | 100 ++++++++++++++++++ src/tasks/utils/fluentbit.cr | 54 ---------- src/tasks/utils/fluentd.cr | 50 --------- src/tasks/utils/fluentd_bitnami.cr | 54 ---------- src/tasks/workload/observability.cr | 57 ++++------ 14 files changed, 172 insertions(+), 243 deletions(-) rename embedded_files/{fluentbit-config.yml => fluentbit-values.yml} (100%) create mode 100644 embedded_files/fluentd-bitnami-values.yml create mode 100644 src/tasks/fluent_setup.cr delete mode 100644 src/tasks/fluentbit_setup.cr delete mode 100644 src/tasks/fluentd_setup.cr delete mode 100644 src/tasks/fluentdbitnami_setup.cr create mode 100644 src/tasks/utils/fluent_manager.cr delete mode 100644 src/tasks/utils/fluentbit.cr delete mode 100644 src/tasks/utils/fluentd.cr delete mode 100644 src/tasks/utils/fluentd_bitnami.cr diff --git a/embedded_files/fluentbit-config.yml b/embedded_files/fluentbit-values.yml similarity index 100% rename from embedded_files/fluentbit-config.yml rename to embedded_files/fluentbit-values.yml diff --git a/embedded_files/fluentd-bitnami-values.yml b/embedded_files/fluentd-bitnami-values.yml new file mode 100644 index 000000000..4d574df3e --- /dev/null +++ b/embedded_files/fluentd-bitnami-values.yml @@ -0,0 +1,2 @@ +aggregator: + enabled: false diff --git a/spec/workload/observability_spec.cr b/spec/workload/observability_spec.cr index 64a183233..5547d45dd 100644 --- a/spec/workload/observability_spec.cr +++ b/spec/workload/observability_spec.cr @@ -1,7 +1,7 @@ require "../spec_helper" require "colorize" require "../../src/tasks/utils/utils.cr" -require "../../src/tasks/utils/fluentbit.cr" +require "../../src/tasks/utils/fluent_manager.cr" require "../../src/tasks/jaeger_setup.cr" describe "Observability" do @@ -125,7 +125,7 @@ describe "Observability" do result = ShellCmd.run_testsuite("cnf_setup cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml") result = ShellCmd.run_testsuite("install_fluentdbitnami") result = ShellCmd.run_testsuite("routed_logs") - (/(PASSED).*(Your cnf's logs are being captured)/ =~ result[:output]).should_not be_nil + (/(PASSED).*(Your CNF's logs are being captured)/ =~ result[:output]).should_not be_nil ensure result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml") result = ShellCmd.run_testsuite("uninstall_fluentdbitnami") @@ -134,26 +134,26 @@ describe "Observability" do it "'routed_logs' should pass if cnfs logs are captured by fluentbit", tags: ["observability"] do result = ShellCmd.run_testsuite("cnf_setup cnf-config=sample-cnfs/sample-fluentbit") - FluentBit.install + result = ShellCmd.run_testsuite("install_fluentbit") result = ShellCmd.run_testsuite("routed_logs") - (/(PASSED).*(Your cnf's logs are being captured)/ =~ result[:output]).should_not be_nil + (/(PASSED).*(Your CNF's logs are being captured)/ =~ result[:output]).should_not be_nil ensure result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-fluentbit") - FluentBit.uninstall + result = ShellCmd.run_testsuite("uninstall_fluentbit") result[:status].success?.should be_true end it "'routed_logs' should fail if cnfs logs are not captured", tags: ["observability"] do result = ShellCmd.run_testsuite("cnf_setup cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml") - Helm.helm_repo_add("bitnami","oci://registry-1.docker.io/bitnamicharts") + Helm.helm_repo_add("bitnami","https://charts.bitnami.com/bitnami") #todo #helm install --values ./override.yml fluentd ./fluentd Helm.install("--values ./spec/fixtures/fluentd-values-bad.yml -n #{TESTSUITE_NAMESPACE} fluentd bitnami/fluentd") - Log.info { "Installing FluentD daemonset " } + Log.info { "Installing FluentD daemonset" } KubectlClient::Get.resource_wait_for_install("Daemonset", "fluentd", namespace: TESTSUITE_NAMESPACE) result = ShellCmd.run_testsuite("routed_logs") - (/(FAILED).*(Your cnf's logs are not being captured)/ =~ result[:output]).should_not be_nil + (/(FAILED).*(Your CNF's logs are not being captured)/ =~ result[:output]).should_not be_nil ensure result = ShellCmd.run_testsuite("cnf_cleanup cnf-config=sample-cnfs/sample-coredns-cnf/cnf-testsuite.yml") result = ShellCmd.run_testsuite("uninstall_fluentd") diff --git a/src/tasks/constants.cr b/src/tasks/constants.cr index 2a9e008c0..c7c042947 100644 --- a/src/tasks/constants.cr +++ b/src/tasks/constants.cr @@ -39,6 +39,7 @@ EmbeddedFileManager.constraint_template EmbeddedFileManager.disable_cni EmbeddedFileManager.fluentd_values EmbeddedFileManager.fluentbit_values +EmbeddedFileManager.fluentd_bitnami_values EmbeddedFileManager.ueransim_helmconfig EXCLUDE_NAMESPACES = [ diff --git a/src/tasks/fluent_setup.cr b/src/tasks/fluent_setup.cr new file mode 100644 index 000000000..daf79b888 --- /dev/null +++ b/src/tasks/fluent_setup.cr @@ -0,0 +1,34 @@ +require "sam" +require "file_utils" +require "colorize" +require "totem" + +desc "Install FluentD" +task "install_fluentd" do |_, args| + FluentManager::FluentD.new.install +end + +desc "Uninstall FluentD" +task "uninstall_fluentd" do |_, args| + FluentManager::FluentD.new.uninstall +end + +desc "Install FluentDBitnami" +task "install_fluentdbitnami" do |_, args| + FluentManager::FluentDBitnami.new.install +end + +desc "Uninstall FluentDBitnami" +task "uninstall_fluentdbitnami" do |_, args| + FluentManager::FluentDBitnami.new.uninstall +end + +desc "Install FluentBit" +task "install_fluentbit" do |_, args| + FluentManager::FluentBit.new.install +end + +desc "Uninstall FluentBit" +task "uninstall_fluentbit" do |_, args| + FluentManager::FluentBit.new.uninstall +end diff --git a/src/tasks/fluentbit_setup.cr b/src/tasks/fluentbit_setup.cr deleted file mode 100644 index b789efeaa..000000000 --- a/src/tasks/fluentbit_setup.cr +++ /dev/null @@ -1,14 +0,0 @@ -require "sam" -require "file_utils" -require "colorize" -require "totem" - -desc "Install FluentBit" -task "install_fluentbit" do |_, args| - FluentBit.install -end - -desc "Uninstall FluentBit" -task "uninstall_fluentbit" do |_, args| - FluentBit.uninstall -end diff --git a/src/tasks/fluentd_setup.cr b/src/tasks/fluentd_setup.cr deleted file mode 100644 index ff33b0f17..000000000 --- a/src/tasks/fluentd_setup.cr +++ /dev/null @@ -1,14 +0,0 @@ -require "sam" -require "file_utils" -require "colorize" -require "totem" - -desc "Install Fluentd" -task "install_fluentd" do |_, args| - FluentD.install -end - -desc "Uninstall Fluentd" -task "uninstall_fluentd" do |_, args| - FluentD.uninstall -end diff --git a/src/tasks/fluentdbitnami_setup.cr b/src/tasks/fluentdbitnami_setup.cr deleted file mode 100644 index 67f11b918..000000000 --- a/src/tasks/fluentdbitnami_setup.cr +++ /dev/null @@ -1,14 +0,0 @@ -require "sam" -require "file_utils" -require "colorize" -require "totem" - -desc "Install Fluentd bitnami" -task "install_fluentdbitnami" do |_, args| - FluentDBitnami.install -end - -desc "Uninstall Fluentd bitnami" -task "uninstall_fluentdbitnami" do |_, args| - FluentDBitnami.uninstall -end diff --git a/src/tasks/utils/embedded_file_manager.cr b/src/tasks/utils/embedded_file_manager.cr index 62cf683b4..29fa798f4 100644 --- a/src/tasks/utils/embedded_file_manager.cr +++ b/src/tasks/utils/embedded_file_manager.cr @@ -35,7 +35,10 @@ module EmbeddedFileManager FLUENTD_VALUES = Base64.decode_string("{{ `cat ./embedded_files/fluentd-values.yml | base64`}}") end macro fluentbit_values - FLUENTBIT_VALUES = Base64.decode_string("{{ `cat ./embedded_files/fluentbit-config.yml | base64`}}") + FLUENTBIT_VALUES = Base64.decode_string("{{ `cat ./embedded_files/fluentbit-values.yml | base64`}}") + end + macro fluentd_bitnami_values + FLUENTD_BITNAMI_VALUES = Base64.decode_string("{{ `cat ./embedded_files/fluentd-bitnami-values.yml | base64`}}") end macro ueransim_helmconfig UERANSIM_HELMCONFIG = Base64.decode_string("{{ `cat ./embedded_files/ue.yaml | base64`}}") diff --git a/src/tasks/utils/fluent_manager.cr b/src/tasks/utils/fluent_manager.cr new file mode 100644 index 000000000..78ae33872 --- /dev/null +++ b/src/tasks/utils/fluent_manager.cr @@ -0,0 +1,100 @@ +module FluentManager + abstract class FluentBase + getter flavor_name : String + getter repo_url : String + getter values_file : String + getter values_macro : String + getter image_name : String + getter chart : String + + def initialize(flavor_name : String, repo_url : String, values_file : String, values_macro : String, image_name : String, chart : String) + @flavor_name = flavor_name + @repo_url = repo_url + @values_file = values_file + @values_macro = values_macro + @image_name = image_name + @chart = chart + end + + def install + Log.info { "Installing #{flavor_name} daemonset using #{values_file}" } + Helm.helm_repo_add(flavor_name, repo_url) + File.write(values_file, values_macro) + begin + Helm.install("--values #{values_file} -n #{TESTSUITE_NAMESPACE} #{flavor_name} #{chart}") + KubectlClient::Get.resource_wait_for_install("Daemonset", flavor_name, namespace: TESTSUITE_NAMESPACE) + rescue Helm::CannotReuseReleaseNameError + Log.info { "Release #{flavor_name} already installed" } + end + end + + def uninstall + Log.info { "Uninstalling #{flavor_name} in #{TESTSUITE_NAMESPACE}" } + Helm.delete("#{flavor_name} -n #{TESTSUITE_NAMESPACE}") + end + + def installed? + KubectlClient::Get.resource_wait_for_install("Daemonset", flavor_name, namespace: TESTSUITE_NAMESPACE) + end + end + + class FluentD < FluentBase + def initialize + super("fluentd", + "https://fluent.github.io/helm-charts", + "fluentd-values.yml", + FLUENTD_VALUES, + "fluent/fluentd-kubernetes-daemonset", + "fluent/fluentd") + end + end + + class FluentDBitnami < FluentBase + def initialize + super("fluentdbitnami", + "https://charts.bitnami.com/bitnami", + "fluentd-bitnami-values.yml", + FLUENTD_BITNAMI_VALUES, + "bitnami/fluentd", + "bitnami/fluentd") + end + end + + class FluentBit < FluentBase + def initialize + super("fluent-bit", + "https://fluent.github.io/helm-charts", + "fluentbit-values.yml", + FLUENTBIT_VALUES, + "fluent/fluent-bit", + "fluent/fluent-bit") + end + end + + def self.find_active_match + all_flavors.each do |flavor| + match = ClusterTools.local_match_by_image_name(flavor.image_name) + return match if match[:found] + end + nil + end + + def self.pod_tailed?(pod_name, match) + return false unless match + + fluent_pods = KubectlClient::Get.pods_by_digest(match[:digest]) + fluent_pods.each do |fluent_pod| + fluent_pod_name = fluent_pod.dig("metadata", "name").as_s + logs = KubectlClient.logs(fluent_pod_name, namespace: TESTSUITE_NAMESPACE) + Log.info { "Searching logs of #{fluent_pod_name} for string #{pod_name}" } + Log.debug { "Fluent logs: #{logs}" } + return true if logs[:output].to_s.includes?(pod_name) + end + + false + end + + def self.all_flavors : Array(FluentBase) + [FluentD.new, FluentDBitnami.new, FluentBit.new] + end +end diff --git a/src/tasks/utils/fluentbit.cr b/src/tasks/utils/fluentbit.cr deleted file mode 100644 index 04511cc95..000000000 --- a/src/tasks/utils/fluentbit.cr +++ /dev/null @@ -1,54 +0,0 @@ -module FluentBit - def self.install - #todo use embedded file to install fluentd values over fluent helm - #chart - Log.info {"Installing FluentBit daemonset "} - File.write("fluentbit-config.yml", FLUENTBIT_VALUES) - Helm.helm_repo_add("fluent", "https://fluent.github.io/helm-charts") - - # Install fluent-bit in the cnf-testsuite namespace - begin - Helm.install("--values ./fluentbit-config.yml -n #{TESTSUITE_NAMESPACE} fluent-bit fluent/fluent-bit") - KubectlClient::Get.resource_wait_for_install("Daemonset", "fluent-bit", namespace: TESTSUITE_NAMESPACE) - rescue Helm::CannotReuseReleaseNameError - Log.info { "FluentBit already installed" } - end - end - - def self.uninstall - Log.for("verbose").info { "uninstall_fluentbit" } - Helm.delete("fluent-bit -n #{TESTSUITE_NAMESPACE}") - end - - def self.match() - ClusterTools.local_match_by_image_name("fluent/fluent-bit") - end -# todo check if td agent (log forwarder) exists -# todo check if td agent (log aggregrator) exists - # todo pick a popular fluentd service discovery method and check its - # configuration files to see if they are configured - # - # - # todo check if fluentd installed (if not, skip) - def self.installed? - KubectlClient::Get.resource_wait_for_install("Daemonset", "fluent-bit", namespace: TESTSUITE_NAMESPACE) - end - - # todo check fluentd log to see if container of application is being - # tailed - def self.app_tailed?(pod_name, match=nil) - Log.info { "app_tailed_by_fluentbit pod_name: #{pod_name} match: #{match}"} - match = match() unless match - Log.info { "app_tailed_by_fluentbit match: #{match}"} - found = false - fluentbit_pods = KubectlClient::Get.pods_by_digest(match[:digest]) - fluentbit_pods.each do |fluentbit_pod| - pod_name = fluentbit_pod.dig("metadata","name").as_s - logs = KubectlClient.logs(pod_name, namespace: TESTSUITE_NAMESPACE) - Log.debug { "fluentbit logs: #{logs}"} - found = logs[:output].to_s.includes?(pod_name) - end - Log.info { "fluentbit found match: #{found}"} - found - end -end diff --git a/src/tasks/utils/fluentd.cr b/src/tasks/utils/fluentd.cr deleted file mode 100644 index 3f3e3eacc..000000000 --- a/src/tasks/utils/fluentd.cr +++ /dev/null @@ -1,50 +0,0 @@ -module FluentD - def self.install - #todo use embedded file to install fluentd values over fluent helm - #chart - Log.info {"Installing FluentD daemonset "} - File.write("fluentd-values.yml", FLUENTD_VALUES) - Helm.helm_repo_add("fluent","https://fluent.github.io/helm-charts") - - # Install fluentd in the cnf-testsuite namespace - Helm.install("--values ./fluentd-values.yml -n #{TESTSUITE_NAMESPACE} fluentd fluent/fluentd") - KubectlClient::Get.resource_wait_for_install("Daemonset", "fluentd", namespace: TESTSUITE_NAMESPACE) - end - - def self.uninstall - Log.for("verbose").info { "uninstall_fluentd" } - Helm.delete("fluentd -n #{TESTSUITE_NAMESPACE}") - end - - def self.match() - ClusterTools.local_match_by_image_name("fluent/fluentd-kubernetes-daemonset") - end -# todo check if td agent (log forwarder) exists -# todo check if td agent (log aggregrator) exists - # todo pick a popular fluentd service discovery method and check its - # configuration files to see if they are configured - # - # - # todo check if fluentd installed (if not, skip) - def self.installed? - KubectlClient::Get.resource_wait_for_install("Daemonset", "fluentd", namespace: TESTSUITE_NAMESPACE) - end - - # todo check fluentd log to see if container of application is being - # tailed - def self.app_tailed_by_fluentd?(pod_name, match=nil) - Log.info { "app_tailed_by_fluentd pod_name: #{pod_name} match: #{match}"} - match = match() unless match - Log.info { "app_tailed_by_fluentd match: #{match}"} - found = false - fluentd_pods = KubectlClient::Get.pods_by_digest(match[:digest]) - fluentd_pods.each do |fluentd| - pod_name = fluentd.dig("metadata","name").as_s - logs = KubectlClient.logs(pod_name, namespace: TESTSUITE_NAMESPACE) - Log.debug { "fluentd logs: #{logs}"} - found = logs[:output].to_s.includes?(pod_name) - end - Log.info { "fluentd found match: #{found}"} - found - end -end diff --git a/src/tasks/utils/fluentd_bitnami.cr b/src/tasks/utils/fluentd_bitnami.cr deleted file mode 100644 index a59970bb7..000000000 --- a/src/tasks/utils/fluentd_bitnami.cr +++ /dev/null @@ -1,54 +0,0 @@ -module FluentDBitnami - def self.install - #todo use embedded file to install fluentd values over fluent helm - #chart - Log.info {"Installing FluentD Bitnami daemonset "} - # File.write("fluentd-values.yml", FLUENTD_VALUES) - # Helm.helm_repo_add("fluent","https://fluent.github.io/helm-charts") - Helm.helm_repo_add("bitnami","oci://registry-1.docker.io/bitnamicharts") - # - # # Install fluentd in the cnf-testsuite namespace - # Helm.install("--values ./fluentd-values.yml -n #{TESTSUITE_NAMESPACE} fluentd fluent/fluentd") - # Helm.helm_repo_add("fluent", "https://fluent.github.io/helm-charts") - Helm.install("--set aggregator.enabled=false -n #{TESTSUITE_NAMESPACE} fluentd bitnami/fluentd") - KubectlClient::Get.resource_wait_for_install("Daemonset", "fluentd", namespace: TESTSUITE_NAMESPACE) - end - - def self.uninstall - Log.for("verbose").info { "uninstall_fluentd" } - Helm.delete("fluentd -n #{TESTSUITE_NAMESPACE}") - end - - def self.match() - ClusterTools.local_match_by_image_name("bitnami/fluentd") - end -# todo check if td agent (log forwarder) exists -# todo check if td agent (log aggregrator) exists - # todo pick a popular fluentd service discovery method and check its - # configuration files to see if they are configured - # - # - # todo check if fluentd installed (if not, skip) - def self.installed? - KubectlClient::Get.resource_wait_for_install("Daemonset", "fluentd", namespace: TESTSUITE_NAMESPACE) - end - - # todo check fluentd log to see if container of application is being - # tailed - def self.app_tailed_by_fluentd?(pod_name, match=nil) - Log.info { "bitnami app_tailed_by_fluentd pod_name: #{pod_name} match: #{match}"} - match = match() unless match - Log.info { "app_tailed_by_fluentd match: #{match}"} - found = false - fluentd_pods = KubectlClient::Get.pods_by_digest(match[:digest]) - Log.info { "fluentd_pods match: #{fluentd_pods}"} - fluentd_pods.each do |fluentd| - pod_name = fluentd.dig("metadata","name").as_s - logs = KubectlClient.logs(pod_name, namespace: TESTSUITE_NAMESPACE) - Log.debug { "fluentd logs: #{logs}"} - found = logs[:output].to_s.includes?(pod_name) - end - Log.info { "fluentd found match: #{found}"} - found - end -end diff --git a/src/tasks/workload/observability.cr b/src/tasks/workload/observability.cr index f12c1c395..3942c4213 100644 --- a/src/tasks/workload/observability.cr +++ b/src/tasks/workload/observability.cr @@ -183,42 +183,32 @@ desc "Are the CNF's logs captured by a logging system" task "routed_logs", ["install_cluster_tools"] do |t, args| next if args.named["offline"]? task_response = CNFManager::Task.task_runner(args, task: t) do |args, config| - fluentd_match = FluentD.match() - fluentbit_match = FluentBit.match() - fluentbitBitnami_match = FluentDBitnami.match() + match = FluentManager.find_active_match + unless match + next CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "Fluentd or FluentBit not configured") + end - Log.info { "fluentd match: #{fluentd_match}" } - Log.info { "fluentbit match: #{fluentbit_match}" } - Log.info { "fluentbitBitnami_match match: #{fluentbitBitnami_match}" } - if fluentd_match[:found] || fluentbit_match[:found] || fluentbitBitnami_match[:found] - all_resourced_logged = CNFManager.workload_resource_test(args, config) do |resource_name, container, initialized| - resource_logged = true - resource = KubectlClient::Get.resource(resource_name[:kind], resource_name[:name], resource_name[:namespace]) - pods = KubectlClient::Get.pods_by_resource(resource, namespace: resource_name[:namespace]) - pods.each do |pod| - # if any pod/container is not monitored by fluentd or fluentbit, fail - if resource_logged - if fluentd_match[:found] - resource_logged = FluentD.app_tailed_by_fluentd?(pod.dig("metadata", "name"), fluentd_match) - end - if fluentbit_match[:found] - resource_logged = FluentBit.app_tailed?(pod.dig("metadata", "name"), fluentbit_match) - end - if fluentbitBitnami_match[:found] - resource_logged = FluentDBitnami.app_tailed_by_fluentd?(pod.dig("metadata", "name"), fluentbitBitnami_match) - end - end - end - resource_logged - end - Log.info { "all_resourced_logged: #{all_resourced_logged}" } - if all_resourced_logged - CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Passed, "Your cnf's logs are being captured") - else - CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Failed, "Your cnf's logs are not being captured") + all_pods_logged = true + CNFManager.workload_resource_test(args, config) do |resource_name, container, initialized| + resource = KubectlClient::Get.resource(resource_name[:kind], resource_name[:name], resource_name[:namespace]) + pods = KubectlClient::Get.pods_by_resource(resource, namespace: resource_name[:namespace]) + + pods.each do |pod| + pod_name = pod.dig("metadata", "name").as_s + unless FluentManager.pod_tailed?(pod_name, match) + Log.info { "Pod #{pod_name} logs are not being captured "} + all_pods_logged = false + break end + end + + break unless all_pods_logged + end + + if all_pods_logged + CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Passed, "Your CNF's logs are being captured") else - CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Skipped, "Fluentd or FluentBit not configured") + CNFManager::TestcaseResult.new(CNFManager::ResultStatus::Failed, "Your CNF's logs are not being captured") end end end @@ -257,4 +247,3 @@ task "tracing" do |t, args| end end end -