-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore: add telemetry for examples #1098
base: main
Are you sure you want to change the base?
Conversation
### What does this PR do? Adds telemetry for building as well as pulling examples ### Screenshot / video of UI <!-- If this PR is changing UI, please include screenshots or screencasts showing the difference --> N/A ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes podman-desktop#1047 ### How to test this PR? <!-- Please explain steps to reproduce --> Functions on example should work as normal. Signed-off-by: Charlie Drage <[email protected]>
If you can double-check that I did this right, please let me know! First time adding telemetry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM codewise
@@ -90,10 +91,16 @@ test('pullImage function is called when Pull image button is clicked', async () | |||
|
|||
// Find and click the "Pull image" button | |||
const pullButton = screen.getByTitle('Pull image'); | |||
|
|||
// spy on telemetryLogUsage function | |||
const spyOnLogUsage = vi.spyOn(bootcClient, 'telemetryLogUsage'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably do vi.mocked(bootcClient.telemetryLogUsage)
and expect(bootcClient.telemetryLogUsage).toHaveBeenCalled()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call! updated
@@ -90,10 +91,16 @@ test('pullImage function is called when Pull image button is clicked', async () | |||
|
|||
// Find and click the "Pull image" button | |||
const pullButton = screen.getByTitle('Pull image'); | |||
|
|||
// spy on telemetryLogUsage function | |||
vi.mocked(bootcClient.telemetryLogUsage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why this is required ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, not required! updated the PR.
Signed-off-by: Charlie Drage <[email protected]>
chore: add telemetry for examples
What does this PR do?
Adds telemetry for building as well as pulling examples
Screenshot / video of UI
N/A
What issues does this PR fix or reference?
Closes #1047
How to test this PR?
Functions on example should work as normal.
Signed-off-by: Charlie Drage [email protected]