Skip to content

Commit 3441d90

Browse files
authored
Add catalogd to code coverage (#2026)
Signed-off-by: Todd Short <[email protected]>
1 parent b004bc2 commit 3441d90

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: catalogd-controller-manager
5+
namespace: olmv1-system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: manager
11+
env:
12+
- name: GOCOVERDIR
13+
value: /e2e-coverage
14+
volumeMounts:
15+
- name: e2e-coverage-volume
16+
mountPath: /e2e-coverage
17+
volumes:
18+
- name: e2e-coverage-volume
19+
persistentVolumeClaim:
20+
claimName: e2e-coverage

config/components/coverage/kustomization.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ resources:
55
- manager_e2e_coverage_pvc.yaml
66
- manager_e2e_coverage_copy_pod.yaml
77
patches:
8-
- path: manager_e2e_coverage_patch.yaml
8+
- path: operator_controller_manager_e2e_coverage_patch.yaml
9+
- path: catalogd_manager_e2e_coverage_patch.yaml

hack/test/e2e-coverage.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ COVERAGE_OUTPUT="${COVERAGE_OUTPUT:-${ROOT_DIR}/coverage/e2e.out}"
66

77
OPERATOR_CONTROLLER_NAMESPACE="olmv1-system"
88
OPERATOR_CONTROLLER_MANAGER_DEPLOYMENT_NAME="operator-controller-controller-manager"
9+
10+
CATALOGD_NAMESPACE="olmv1-system"
11+
CATALOGD_MANAGER_DEPLOYMENT_NAME="catalogd-controller-manager"
12+
913
COPY_POD_NAME="e2e-coverage-copy-pod"
1014

1115
# Create a temporary directory for coverage
@@ -15,6 +19,7 @@ rm -rf ${COVERAGE_DIR} && mkdir -p ${COVERAGE_DIR}
1519
# Coverage-instrumented binary produces coverage on termination,
1620
# so we scale down the manager before gathering the coverage
1721
kubectl -n "$OPERATOR_CONTROLLER_NAMESPACE" scale deployment/"$OPERATOR_CONTROLLER_MANAGER_DEPLOYMENT_NAME" --replicas=0
22+
kubectl -n "$CATALOGD_NAMESPACE" scale deployment/"$CATALOGD_MANAGER_DEPLOYMENT_NAME" --replicas=0
1823

1924
# Wait for the copy pod to be ready
2025
kubectl -n "$OPERATOR_CONTROLLER_NAMESPACE" wait --for=condition=ready pod "$COPY_POD_NAME"

0 commit comments

Comments
 (0)