Skip to content

feat: add snapshot tests for bundled config #206

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

Merged
merged 5 commits into from
May 19, 2025

Conversation

obs-gh-mattcotter
Copy link
Collaborator

Description

OB-45143 Add snapshot tests for the full bundled config in our test environments. This will catch when the observe-agent's provided otel config changes.

Checklist

  • Created tests which fail without the change (if possible)

Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@obs-gh-mattcotter obs-gh-mattcotter force-pushed the OB-45143-snapshot-tests branch 7 times, most recently from 53e01e2 to 7641175 Compare May 9, 2025 21:47
compression: zstd
endpoint: https://123456789.collect.observe-eng.com/v2/otel
headers:
authorization: Bearer abcdefghijklmnopqrst:OWt0SXV4YTlqYUhpSHZjSlhXUDVkRXpl
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there some way to mark to orca that this isn't a real credential? i feel like it might complain although the tests seem to pass now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@obs-gh-nikhildua do you know if this is possible? Maybe we can figure that out if it ever does complain?

@obs-gh-alexlew
Copy link
Collaborator

how did the snapshots get generated currently? and when am I expected to update these?

@obs-gh-mattcotter
Copy link
Collaborator Author

how did the snapshots get generated currently? and when am I expected to update these?

Good question! I started each file as identical copies of the output of the config command on my mac, then I ran the tests and applied the diff. I looked at the output at the end, and it's what I would expect.

For updating this, whenever we modify our bundled config or add more observe-agent config options we may expect some diffs here. This test is supposed to make it easy to tell when our bundled config changes and to make sure we always consider that during code reviews. It won't say if the change is good or expected, that's up to the reviewers, but it will always flag a change which should catch mistakes.

@obs-gh-mattcotter obs-gh-mattcotter force-pushed the OB-45143-snapshot-tests branch from 4664fdb to b15da7c Compare May 16, 2025 19:42
@obs-gh-mattcotter obs-gh-mattcotter merged commit 7f8006d into main May 19, 2025
12 checks passed
@obs-gh-mattcotter obs-gh-mattcotter deleted the OB-45143-snapshot-tests branch May 19, 2025 14:24
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