Skip to content

Commit 2f9323c

Browse files
committed
fix e2e test issues
1. use NAMESPACE var instead of hardcoding 2. make sure to require yq for the NGTS e2e Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
1 parent 2327c51 commit 2f9323c

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

hack/ark/test-e2e.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,17 @@ timeout 60 jq -n \
128128

129129
# Query the Prometheus metrics endpoint to ensure it's working.
130130
kubectl get pod \
131-
--namespace cyberark \
131+
--namespace $NAMESPACE \
132132
--selector app.kubernetes.io/name=disco-agent \
133133
--output jsonpath={.items[*].metadata.name} \
134-
| xargs -I{} kubectl get --raw /api/v1/namespaces/cyberark/pods/{}:8081/proxy/metrics \
134+
| xargs -I{} kubectl get --raw /api/v1/namespaces/$NAMESPACE/pods/{}:8081/proxy/metrics \
135135
| grep '^process_'
136136

137137
# Query the pprof endpoint to ensure it's working.
138138
kubectl get pod \
139-
--namespace cyberark \
139+
--namespace $NAMESPACE \
140140
--selector app.kubernetes.io/name=disco-agent \
141141
--output jsonpath={.items[*].metadata.name} \
142-
| xargs -I{} kubectl get --raw /api/v1/namespaces/cyberark/pods/{}:8081/proxy/debug/pprof/cmdline \
142+
| xargs -I{} kubectl get --raw /api/v1/namespaces/$NAMESPACE/pods/{}:8081/proxy/debug/pprof/cmdline \
143143
| xargs -0
144144

hack/ngts/test-e2e.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,18 @@ timeout 120 jq -n \
130130

131131
# Query the Prometheus metrics endpoint to ensure it's working.
132132
kubectl get pod \
133-
--namespace ngts \
133+
--namespace ${NAMESPACE} \
134134
--selector app.kubernetes.io/name=discovery-agent \
135135
--output jsonpath={.items[*].metadata.name} \
136-
| xargs -I{} kubectl get --raw /api/v1/namespaces/ngts/pods/{}:8081/proxy/metrics \
136+
| xargs -I{} kubectl get --raw /api/v1/namespaces/$NAMESPACE/pods/{}:8081/proxy/metrics \
137137
| grep '^process_'
138138

139139
# Query the pprof endpoint to ensure it's working.
140140
kubectl get pod \
141-
--namespace ngts \
141+
--namespace ${NAMESPACE} \
142142
--selector app.kubernetes.io/name=discovery-agent \
143143
--output jsonpath={.items[*].metadata.name} \
144-
| xargs -I{} kubectl get --raw /api/v1/namespaces/ngts/pods/{}:8081/proxy/debug/pprof/cmdline \
144+
| xargs -I{} kubectl get --raw /api/v1/namespaces/$NAMESPACE/pods/{}:8081/proxy/debug/pprof/cmdline \
145145
| xargs -0
146146

147147
# TODO: should call to SCM and verify that certs are actually uploaded

make/ngts/02_mod.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ngts-release:
4040
## Run a basic E2E test on a Kind cluster
4141
## See `hack/ngts/e2e.sh` for the full test script.
4242
## @category NGTS Discovery Agent
43-
ngts-test-e2e: $(NEEDS_KIND) $(NEEDS_KUBECTL) $(NEEDS_HELM)
43+
ngts-test-e2e: $(NEEDS_KIND) $(NEEDS_KUBECTL) $(NEEDS_HELM) $(NEEDS_YQ)
4444
PATH="$(bin_dir)/tools:${PATH}" ./hack/ngts/test-e2e.sh
4545

4646
.PHONY: ngts-verify

0 commit comments

Comments
 (0)