Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds dependencies test #17

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Adds dependencies test #17

merged 2 commits into from
Feb 21, 2024

Conversation

codefromthecrypt
Copy link
Member

This adds a dependencies test, which will need further refactoring to support storage types that require dependency-aggregation. However, this works and keeps the first pass small.

This adds a dependencies test, which will need further refactoring to
support storage types that require dependency-aggregation. However, this
works and keeps the first pass small.

Signed-off-by: Adrian Cole <[email protected]>
- >
while ! wget -q --spider http://{{ include "zipkin.fullname" . }}:8081/health;do sleep 1; done &&
for i in 1 2 3;do wget -q --spider http://{{ include "zipkin.fullname" . }}:8081; done
- name: get-dependencies
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The follow-up is.. we'll need a conditional here to invoke the dependencies cron job synchronously, when elasticsearch.

@@ -16,13 +16,31 @@ spec:
# Make sure zipkin registered in Eureka at startup
args: [ 'wget -q --spider http://{{ include "zipkin.fullname" . }}:8761/eureka/v2/apps/ZIPKIN' ]
{{- end }}
{{ if .Values.global.testDependencies }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used a global here as cycling through a list of objects to pick if "frontend" is there, is quite complicated in helm. maps are easier than lists

echo '[{"parent":"frontend","child":"backend","callCount":3}]' > want.json &&
sleep 3 &&
wget -qO have.json --header "b3: 0" http://{{ include "zipkin.fullname" . }}:{{ .Values.service.port }}/api/v2/dependencies?endTs=$(( $(date +%s) * 1000 )) &&
diff -b want.json have.json
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I code go ;)

echo '[{"parent":"frontend","child":"backend","callCount":3}]' > want.json &&
sleep 3 &&
wget -qO have.json --header "b3: 0" http://{{ include "zipkin.fullname" . }}:{{ .Values.service.port }}/api/v2/dependencies?endTs=$(( $(date +%s) * 1000 )) &&
diff -b want.json have.json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
diff -b want.json have.json
diff -b want.json got.json

Just kidding

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha true.. I'm not that go ;)

@codefromthecrypt codefromthecrypt merged commit 4be630b into master Feb 21, 2024
1 check passed
@codefromthecrypt codefromthecrypt deleted the test-dependencies branch February 21, 2024 06:41
@codefromthecrypt
Copy link
Member Author

thanks for the look @anuraaga!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants