Skip to content

Commit 1a22a3c

Browse files
committed
fix: change kubectl dry-run mode from client to server for resource validation
1 parent 527ea2e commit 1a22a3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.tests/test-with-dry-run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ main() {
131131
((TOTAL_RESOURCES++))
132132

133133
# Validate each resource with kubectl dry-run
134-
if kubectl apply -f "${FILE}" --dry-run=client &> /tmp/kbak_test_result; then
134+
if kubectl apply -f "${FILE}" --dry-run=server &> /tmp/kbak_test_result; then
135135
print_success "Resource validated: ${RESOURCE_TYPE}/${RESOURCE_NAME}"
136136
((SUCCESSFUL_RESOURCES++))
137137
else
@@ -160,7 +160,7 @@ main() {
160160
fi
161161

162162
# Validate entire resource type directory
163-
if kubectl apply -f "${DIR}" --dry-run=client &> /tmp/kbak_test_result; then
163+
if kubectl apply -f "${DIR}" --dry-run=server &> /tmp/kbak_test_result; then
164164
print_success "Resource type validated: ${RESOURCE_TYPE}"
165165
else
166166
print_error "Resource type validation failed: ${RESOURCE_TYPE}"

0 commit comments

Comments
 (0)