Skip to content

Commit 9380a5a

Browse files
committed
Review fixes
1 parent f824774 commit 9380a5a

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

scripts/code_snippets/tests/test_kind_search_community_snippets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ echo "Sourcing env variables for ${CODE_SNIPPETS_FLAVOR} flavor"
1717
test -f "${test_dir}/env_variables_${CODE_SNIPPETS_FLAVOR}.sh" && source "${test_dir}/env_variables_${CODE_SNIPPETS_FLAVOR}.sh"
1818

1919
${test_dir}/test.sh
20-
scripts/code_snippets/kind_community_search_snippets_render_template.sh
20+
scripts/code_snippets/kind_community_search_snippets_render_template.sh "${test_dir}"

scripts/evergreen/e2e/dump_diagnostic_information.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,26 +106,26 @@ dump_objects() {
106106
return
107107
fi
108108

109-
# Capture output first to check if it contains actual resources
110-
local temp_output
111-
temp_output=$(kubectl --context="${context}" -n "${namespace}" ${action} "${object}" 2>&1)
112-
113-
# Check if output contains actual resources (not just empty list)
114-
# Skip if it's an empty YAML list (contains "items: []")
115-
if printf '%s\n' "${temp_output}" | grep -Fq "items: []"; then
116-
# Empty list, don't create file
117-
return
118-
fi
119-
120-
if [[ -n "${out_file}" ]]; then
121-
{
122-
header "${msg}"
123-
echo "${temp_output}"
124-
} > "${out_file}"
125-
else
109+
# Capture output first to check if it contains actual resources
110+
local temp_output
111+
temp_output=$(kubectl --context="${context}" -n "${namespace}" ${action} "${object}" 2>&1)
112+
113+
# Check if output contains actual resources (not just empty list)
114+
# Skip if it's an empty YAML list (contains "items: []")
115+
if printf '%s\n' "${temp_output}" | grep -Fq "items: []"; then
116+
# Empty list, don't create file
117+
return
118+
fi
119+
120+
if [[ -n "${out_file}" ]]; then
121+
{
126122
header "${msg}"
127-
kubectl --context="${context}" -n "${namespace}" ${action} "${object}" 2>&1
128-
fi
123+
echo "${temp_output}"
124+
} > "${out_file}"
125+
else
126+
header "${msg}"
127+
kubectl --context="${context}" -n "${namespace}" ${action} "${object}" 2>&1
128+
fi
129129
}
130130

131131
# get_operator_managed_pods returns a list of names of the Pods that are managed

0 commit comments

Comments
 (0)