Skip to content

Commit d08d144

Browse files
committed
[to-be-reverted]: Add debug for e2e tests
1 parent 15ddb87 commit d08d144

1 file changed

Lines changed: 53 additions & 8 deletions

File tree

integration-tests/opendatahub-operator/e2e-test.yaml

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,16 +248,61 @@ spec:
248248
- name: credentials
249249
mountPath: /credentials
250250
script: |
251-
apk add --no-cache bash make git curl \
252-
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
253-
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
254-
&& rm kubectl
255-
# Deploy the operator
251+
set -x # Show commands as they execute
252+
253+
# Install dependencies (same as local)
254+
apk add --no-cache bash make git curl
255+
256+
# Install kubectl
257+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
258+
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
259+
rm kubectl
260+
261+
echo "============================================"
262+
echo "Workspace root directory structure:"
263+
ls -la /workspace/source/
264+
265+
echo "============================================"
266+
echo "All directories in workspace:"
267+
find /workspace/source -maxdepth 2 -type d
268+
269+
echo "============================================"
270+
echo "Checking tests/e2e directory contents:"
271+
ls -la tests/e2e/ || echo "tests/e2e directory not found!"
272+
273+
echo "============================================"
274+
echo "Checking for test files:"
275+
find tests/e2e/ -name "*_test.go" -o -name "*.go" 2>&1 || echo "No Go files found"
276+
277+
echo "============================================"
278+
echo "Go list output for test files:"
279+
go list -f '{{.TestGoFiles}}' ./tests/e2e/
280+
281+
echo "============================================"
282+
echo "Attempting to compile tests directly:"
283+
go test -c -v ./tests/e2e/ 2>&1 || echo "Test compilation failed - error above"
284+
285+
echo "============================================"
286+
echo "Deploying operator..."
256287
make deploy IMG=$(params.operator-image) OPERATOR_NAMESPACE=$(params.namespace)
257-
# Wait for operator to be ready
288+
289+
echo "============================================"
290+
echo "Waiting for operator to be ready..."
258291
kubectl wait --for=condition=available --timeout=30s deployment/opendatahub-operator-controller-manager -n $(params.namespace)
259-
# Run e2e tests
260-
make e2e-test -e E2E_TEST_OPERATOR_NAMESPACE=$(params.namespace)
292+
293+
echo "============================================"
294+
echo "Running e2e tests with verbose flags..."
295+
make e2e-test -e E2E_TEST_OPERATOR_NAMESPACE=$(params.namespace) E2E_TEST_FLAGS="-v -timeout 50m" 2>&1 || {
296+
EXIT_CODE=$?
297+
echo "============================================"
298+
echo "E2E tests failed with exit code: $EXIT_CODE"
299+
echo "Capturing diagnostic information..."
300+
echo "Pods in namespace $(params.namespace):"
301+
kubectl get pods -n $(params.namespace) || true
302+
echo "Operator logs:"
303+
kubectl logs -n $(params.namespace) -l control-plane=controller-manager --tail=100 || true
304+
exit $EXIT_CODE
305+
}
261306
when:
262307
- input: "$(tasks.check-prerequisites.results.prerequisites-met)"
263308
operator: in

0 commit comments

Comments
 (0)