From 1a8a4d046db1215d0d0227792aa3e4e130e2f122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sun, 19 May 2024 14:45:26 +0200 Subject: [PATCH] tests: k8s: setup: Improve / Fix logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's make sure the logs will print the correct annotation and its value, instead of always mentioning "kernel" and "initrd". Signed-off-by: Fabiano FidĂȘncio --- tests/integration/kubernetes/setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/kubernetes/setup.sh b/tests/integration/kubernetes/setup.sh index c61614fc1e..ba33d68a96 100755 --- a/tests/integration/kubernetes/setup.sh +++ b/tests/integration/kubernetes/setup.sh @@ -57,7 +57,7 @@ add_annotations_to_yaml() { case "${resource_kind}" in Pod) - echo "Adding kernel and initrd annotations to ${resource_kind} from ${yaml_file}" + info "Adding \"${annotation_name}=${annotation_value}\" to ${resource_kind} from ${yaml_file}" yq write -i \ "${K8S_TEST_YAML}" \ "metadata.annotations[${annotation_name}]" \ @@ -65,7 +65,7 @@ add_annotations_to_yaml() { ;; Deployment|Job|ReplicationController) - echo "Adding kernel and initrd annotations to ${resource_kind} from ${yaml_file}" + info "Adding \"${annotation_name}=${annotation_value}\" to ${resource_kind} from ${yaml_file}" yq write -i \ "${K8S_TEST_YAML}" \ "spec.template.metadata.annotations[${annotation_name}]" \ @@ -73,15 +73,15 @@ add_annotations_to_yaml() { ;; List) - echo "Issue #7765: adding kernel and initrd annotations to ${resource_kind} from ${yaml_file} is not implemented yet" + info "Issue #7765: adding annotations to ${resource_kind} from ${yaml_file} is not implemented yet" ;; ConfigMap|LimitRange|Namespace|PersistentVolume|PersistentVolumeClaim|RuntimeClass|Secret|Service) - echo "Kernel and initrd annotations are not required for ${resource_kind} from ${yaml_file}" + info "Annotations are not required for ${resource_kind} from ${yaml_file}" ;; *) - echo "k8s resource type ${resource_kind} from ${yaml_file} is not yet supported for kernel and initrd annotations testing" + info "k8s resource type ${resource_kind} from ${yaml_file} is not yet supported for annotations testing" return 1 ;; esac